> ## Documentation Index
> Fetch the complete documentation index at: https://docs.urldn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart links

> Send visitors to different pages based on their country or device, all from one short link.

A smart link is a regular short link with targeting rules. When someone opens it, URLdn checks where they are and what device they use, then sends them to the page that fits them best. You share one link, and every visitor lands in the right place.

**Example:** you sell an app. You share `go.example.com/app`. iPhone visitors go to the App Store, Android visitors go to Google Play, and everyone else goes to your website.

> [!NOTE]
>
> Geo and device targeting are available on Pro, Business, and Enterprise plans. Free accounts can see the options but must upgrade to add rules.

## Types of rules

> [card] Geo targeting
>
> Send visitors from specific countries to a different page. Useful for local stores, translated pages, or regional offers.

> [card] Device targeting
>
> Send iOS, Android, or desktop visitors to a different page. Useful for app downloads and mobile-only pages.

## Create a smart link

**1. Start a new link**

Open **Dashboard > Links** and choose **Create link**. You can also use the **Smart Link** menu and choose **Create a smart link**.

**2. Add the main destination**

Paste the URL that visitors should see when no rule matches them. This is your fallback page.

**3. Add geo rules**

Open **Geo targeting** and choose **Add rule**. Pick one or more countries, then enter the URL those visitors should open.

**4. Add device rules**

Open **Device targeting** and choose **Add rule**. Pick **iOS**, **Android**, or **Desktop**, then enter the URL for that device.

**5. Create and test**

Choose **Create Short URL**. Open the link on different devices to confirm each rule sends you where you expect.

## How URLdn picks the destination

URLdn checks the rules in a fixed order every time someone opens the link:

1. **Geo rules first.** If the visitor's country is in a geo rule, they go to that rule's URL. When several geo rules exist, the first matching rule wins.
2. **Device rules next.** If no geo rule matched, URLdn checks the visitor's device. If there is a rule for it, they go to that rule's URL.
3. **Main destination last.** If nothing matched, the visitor goes to the main destination.

A few details help when you plan your rules:

* iPhone, iPad, and iPod visitors count as **iOS**. Newer iPads that identify as a Mac count as **Desktop**.
* Any device URLdn cannot identify counts as **Desktop**.
* If the visitor's country cannot be detected, URLdn skips the geo rules and moves on to the device rules.

## Leave the main destination empty

You can create a smart link with rules only. In that case URLdn picks a main destination for you:

* The **Desktop** rule URL, if you added one
* Otherwise, the first device rule URL
* Otherwise, the first geo rule URL

The dashboard shows a notice telling you which URL was chosen. You can edit the link later to change it.

## Rule limits

| Limit | Value |
| - | -: |
| Geo rules per link | 10 |
| Countries per geo rule | 50 |
| Device rules per link | 3 (one each for iOS, Android, and Desktop) |

Each country can appear in only one geo rule per link, and each device type can have only one rule. Countries use two-letter ISO codes such as `US`, `FR`, or `DE`. The dashboard lets you search by country name.

## Create a smart link with the AI analyst

You can also describe the link in plain English in **Dashboard > Chat**. For example:

> Create a link to [https://example.com](https://example.com) that sends iPhone users to [https://apps.apple.com/app/123](https://apps.apple.com/app/123) and Android users to [https://play.google.com/store/apps/details?id=com.example](https://play.google.com/store/apps/details?id=com.example)

The AI analyst prepares a preview first. Nothing is created until you choose **Create link** in the chat. See [AI analyst](https://docs.urldn.com/ai-analyst.md) for details.

## Track smart link results

Smart link clicks appear in your normal [analytics](https://docs.urldn.com/analytics.md). Use the country and device breakdowns to confirm each rule is getting the traffic you expect.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.