# URL mapping

SINGLE OFFER SETUP\
When to use: You have one Offer linked to your AI Agent, and you want different ads to send users to different landing pages.\
How it works:<br>

* Add as many URL Mappings as you need: "If ad link contains \[pattern] → send users to \[redirect\_url]"
* If no mapping matches, users go to your default landing page (Target URL)

Configuration:<br>

* Target URL → Your fallback landing page (used when no mapping matches)
* URL Mappings → As many as you need — one per ad/campaign
* pattern: part of the ad link to match (e.g. [shop.com/shoes](http://shop.com/shoes))
* redirect\_url: where users should land (e.g. <https://landing.com/shoes-sale>)

Example:\
\> If ad contains [shop.com/shoes](http://shop.com/shoes) → send to <https://landing.com/shoes-sale>\
\> If ad contains [shop.com/bags](http://shop.com/bags) → send to <https://landing.com/bags-sale>\
\> Everything else → Target URL (default)MULTI-OFFER SETUP\
When to use: You already use multiple Offers for different AI responses, domains, or product contexts — and now you also want custom landing pages per ad.\
How it works:<br>

* The system first picks which Offer to use based on the ad link matching the Offer's Target URL
* Then it checks that Offer's URL Mappings for where to redirect

Configuration per Offer:<br>

* Target URL → Must match the ad link (so the system knows to pick this Offer)
* URL Mappings → Typically ONE mapping
* pattern: same as Target URL
* redirect\_url: your actual landing page

Why only one mapping per Offer?\
Each Offer only handles ads that match its Target URL. So only one mapping will ever apply.\
Exception — the Default Offer:\
The "fallback" Offer catches all ads that didn't match any other Offer. Here you CAN add multiple URL Mappings to route different unmatched ads to different landing pages.CAN ANY OFFER BE A DEFAULT OFFER?\
Yes. Any Offer can be set as the default. Just make sure:<br>

* It has at least one URL Mapping where pattern matches its own Target URL (so it works when directly matched)
* Add extra mappings if you want it to handle other unmatched ad links

QUICK REFERENCE<br>

* Single Offer → Unlimited URL Mappings (add all your ad → landing page pairs here)
* Multi-Offer (regular) → 1 URL Mapping per Offer (pattern must match Target URL)
* Multi-Offer (default) → Unlimited URL Mappings (catches everything else, route as needed)

ONE-LINER SUMMARY\
Single Offer: One Offer, many URL Mappings — routes all your ads.\
Multi-Offer: Many Offers with one URL Mapping each — except the Default Offer which can have many.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.reengage.ai/features/url-mapping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
