N Docs
← Back to site

Routing rules

2 min readUpdated November 23, 2026

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#

RuleMatches onValuesExample
CountryThe visitor’s countryTwo-letter country codes, separated by commasUS,CA to your North American store
Operating systemThe visitor’s systemios, android, windows, macos, linuxios to the App Store
DeviceThe kind of devicemobile, tablet, desktopdesktop to a page with a download button
A/B variantA share of visitorsA weight, like 50See 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 ,. windows matches every version of Windows.

Click Save changes when you’re done.

Geo-targeting with two country rules
Mobile targeting with an iOS rule and a tablet rule

Which rule wins#

When a visitor matches more than one rule, the first kind wins in this order:

  1. Deep link rules (phones only)
  2. Country
  3. Operating system
  4. Device
  5. 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

RuleValueAddress
OSiosYour App Store page
OSandroidYour Google Play page
Main destinationYour website

Local stores

RuleValueAddress
CountryGByourbrand.co.uk
CountryDE,AT,CHyourbrand.de
Main destinationyourbrand.com

A desktop-only download

RuleValueAddress
Devicemobile,tabletA page that says to open it on a computer
Main destinationThe 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.