Routing rules
Rules send different visitors to different addresses from the same short link. One link on a poster can take people in the US to your US store, iPhone users to the App Store and everyone else to your website.
Rule types#
| Rule | Matches on | Values | Example |
|---|---|---|---|
| Country | The visitor’s country | Two-letter country codes, separated by commas | US,CA to your North American store |
| Operating system | The visitor’s system | ios, android, windows, macos, linux | ios to the App Store |
| Device | The kind of device | mobile, tablet, desktop | desktop to a page with a download button |
| A/B variant | A share of visitors | A weight, like 50 | See A/B split testing |
The country comes from Bunny, which knows the country of every request. It doesn’t depend on your visitor location setting.
Add rules#
Open the link, then:
- Geo-targeting: click Add country rule, enter country codes separated by commas (
US,CA,GB) and the address for them. - Mobile targeting: click Add OS rule or Add device rule, enter the value and the address for them. Separate several values with
|or,.windowsmatches every version of Windows.
Click Save changes when you’re done.


Which rule wins#
When a visitor matches more than one rule, the first kind wins in this order:
- Deep link rules (phones only)
- Country
- Operating system
- Device
- A/B split
Within one kind, rules are checked from top to bottom and the first match wins.
So a US visitor on an iPhone goes to the US address when you have both a US rule and an iOS rule. Visitors who match nothing go to the link’s main destination.
Examples#
One QR code for both app stores
| Rule | Value | Address |
|---|---|---|
| OS | ios | Your App Store page |
| OS | android | Your Google Play page |
| Main destination | Your website |
Local stores
| Rule | Value | Address |
|---|---|---|
| Country | GB | yourbrand.co.uk |
| Country | DE,AT,CH | yourbrand.de |
| Main destination | yourbrand.com |
A desktop-only download
| Rule | Value | Address |
|---|---|---|
| Device | mobile,tablet | A page that says to open it on a computer |
| Main destination | The download |
See which rule sent each visitor#
Each click on a link with rules records which rule or A/B variant sent the visitor, or default when none matched. You see the split in the link’s analytics, and conversions are credited to the same rule. See Read your click analytics.
Good to know#
- VPNs show the VPN’s country, so country rules follow that.
- Opening apps. To open an app rather than an app store page, use deep links instead of an OS rule.
- Bots follow the same rules, but they aren’t counted as people in analytics.


