Routing rules: the complete guide

How routing rules decide where each scan of a dynamic code goes: every condition, first match wins, the fallback, geo accuracy, language, A/B splits, rotations and deep links.

Routing rules let one printed code send different people to different places: iPhone users to the App Store, French speakers to the French menu, evening scans to the livestream. They are the most powerful part of QRtoMany and the least obvious, so this guide covers all of it. When you'd rather see it working, the worked examples walk through real rule sets scan by scan, and the scan simulator lets you try your own before you print.

Routing rules come with the Pro plan; A/B splits and rotations with Business.

How a scan is routed

Every scan of a dynamic code goes through the same three steps:

  1. Your rules are checked from the top down. Only rules that are switched on count. The order is the order on the Rules tab — drag a rule, or use the arrow keys on its handle, to move it.
  2. The first rule that matches decides. Its action runs, and no rule below it is looked at. The dashboard shows this with a "First match wins" badge.
  3. If no rule matches, the scan goes to the fallback — the code's own destination, or, on a page-backed code, its hosted landing page. The fallback is required, so a scan always lands somewhere.

That second point matters more than any other. Rules don't combine, and a more specific rule below a broad one never gets a chance. Put narrow rules above wide ones.

If something ever goes wrong while the rules are being evaluated, the scan goes to the fallback rather than to an error page. A scan never dead-ends.

Conditions

A rule has one or more conditions, and it matches a scan when its conditions do. Most conditions take a list of values and an operator: is one of or is not one of.

  • Device type — mobile, tablet or desktop. An iPad in Safari (or Firefox) sends exactly what a Mac in Safari sends, so a scan can't tell the two apart, and "tablet" alone or "desktop" alone matches neither of them in those browsers. To reach both, choose desktop and tablet together. Chrome on an iPad and apps' in-app browsers do say iPad.
  • Operating system — iOS, Android, Windows, macOS or Linux. The same goes for a Mac and an iPad in Safari: "macOS" alone or "iOS" alone matches neither; choose macOS and iOS together to reach both.
  • OS version — the major version of iOS or Android, compared with equals, not equal, greater than, at least, less than or at most. Only scans from that system can match. Windows and Mac aren't offered, because browsers report every recent version of them as the same number. Even on iOS and Android it is often unknown: Chrome, Samsung Internet and every other Chromium browser on Android report Android 10 whatever the phone runs, and from iOS 26 apps' in-app browsers report iOS 18.6. A scan whose version is unknown never matches an OS-version condition, so it goes on to your other rules, then the fallback.
  • In-app browser — whether the scan opened inside Instagram, Facebook, TikTok, Snapchat, WeChat, LINE, X (Twitter), LinkedIn or Pinterest, or in none of them.
  • Country — by country; "UK" finds the United Kingdom, whose scans report GB.
  • Continent — Africa, Antarctica, Asia, Europe, North America, Oceania, South America.
  • Region — a state, province or region within one country, such as California or Hauts-de-France. Best-effort — see below.
  • City — by name, as scans report it: usually the English name (Munich, not München). Case and accents don't matter (Dusseldorf matches Düsseldorf), but a different name does not. The Scans by city table on the Analytics page shows the exact spelling your scans use. Best-effort.
  • Distance from a point — within a radius, in kilometres, of a latitude and longitude. Best-effort.
  • Browser language — see the language section below.
  • Time of day, Day of week and Date range — see time.
  • Scan count — this scan's number among the code's counted scans, compared like a version number: "at most 100" for the first hundred. The first scan to reach a destination is scan 1; bots and scans stopped at a password or age prompt aren't counted. The count is kept where scans are answered, so on a busy code it is approximate — don't promise an exact number of winners with it.
  • Returning visitor — "Has scanned before" or "Scanning for the first time". A small cookie remembers, for up to 400 days, that this browser has scanned this code before. The cookie is set only while the code has an enabled rule with this condition — a code without one sets no such cookie — so visitors are remembered from the moment you publish the rule, and everyone who scanned before that counts as scanning for the first time. It is per browser, not per person: another browser, an app's own browser, private browsing or cleared cookies all count as a first scan.
  • GS1 link type and GS1 batch/lot — on GS1 Digital Link codes only (Business plan). Link type is what a request asks the code for — instructions, recall status — from the link types the code has; an ordinary scan asks for nothing in particular and gets the default link. A rule with no link-type condition routes ordinary scans and nothing else. Batch/lot is the lot printed in the scanned code, matched exactly; a code printed without one never matches.

A condition that can't be read never matches — in either direction. A scan whose country is unknown matches neither "country is one of US" nor "country is not one of US". If a rule depends on something a scan may lack, make sure the rules below it, or the fallback, are a sensible place to land.

Combining conditions

Conditions sit in groups. A group is either AND — all of these must match or OR — any of these can match, and groups can be nested inside each other, up to 6 levels deep. "iPhone and in France" is one AND group; "France or Belgium or Switzerland" can be one country condition listing all three.

A rule with no conditions matches every scan. That is occasionally what you want — as the last rule — but a rule like that anywhere else makes every rule below it unreachable, and the dashboard says so on each of them.

Country is reliable; region, city and distance are best-effort

Location comes from where a scanner's internet connection appears to be. At the level of country and continent that is dependable. Below it, it often isn't.

Apple's iCloud Private Relay — on by default for iCloud+ subscribers, on the phones that make most QR scans — only promises to keep people in the right country. A scanner in New York can appear to be in New Jersey; one in London can appear to be in Manchester. VPNs and corporate networks do the same. When that happens a region, city or distance rule doesn't fail with an error: it quietly fires for the wrong people, or misses the right ones, and your analytics look normal.

So in QRtoMany:

  • Region, city and distance conditions carry a Best-effort badge, and the rule shows a note explaining why.
  • If a best-effort rule has no country-level rule beneath it — a later, switched-on rule on country or continent alone — the dashboard warns you. That rule is the safety net: a scanner the city rule misses still lands on the right country's page instead of your generic fallback.
  • The scan simulator can simulate degraded geo accuracy and flag every rule that depends on region, city or distance.

Treat city-level routing as a refinement on top of country rules, never as the only thing between a scanner and the wrong page. The worked examples show the pattern.

Language is one language per scan

Browsers send a list of languages in order of preference — a Swiss visitor's might be French first, then German. QRtoMany decides one language for each scan: the visitor's highest-ranked language that any of your language rules mentions. If none of them does, it is simply their first language.

Only then are the rules checked, in order. So a French-first visitor who also accepts German gets your French rule even if the German rule sits above it — rule order decides between rules, but it never overrides the visitor's own preference between languages.

A language code covers its variants: fr matches every kind of French (fr-FR, fr-CH, fr-CA); fr-CA matches Canadian French only. The scan simulator shows which language a scan is counted as.

Time: whose clock?

Every time condition asks Whose time does this read?, and there is no default — you choose:

  • Scanner's local time — 9:00 is 9:00 wherever each person scans. Right for opening hours or a lunch menu that depends on the scanner's day.
  • A fixed time zone — 9:00 in the zone you name, the same moment for everyone. Right for a deadline or a launch. Your workspace's time zone is offered in one click, but nothing is filled in for you, and the rule keeps the zone you save it with: changing the workspace's time zone later doesn't move a rule.

A scanner's time zone comes from where their connection appears to be; a scan we can't place is read in UTC.

Time of day runs from its start up to, but not including, its end. A window whose start is after its end runs overnight — 22:00 to 02:00. Day of week takes any set of days. Combined, the two read the same clock, so the hours after midnight belong to the next day: "Friday or Saturday, 22:00 to 02:00" also catches Thursday night after midnight and misses Saturday night after midnight. For Friday and Saturday nights, use two groups joined by OR — 22:00 to 00:00 on Friday and Saturday, and 00:00 to 02:00 on Saturday and Sunday. The rule builder points this out when a rule does it. Date range includes both its first and last day, and either end can be left open.

What a rule does

When a rule matches, it does one of four things:

  • Go to one destination — a web address.
  • A/B split — divide visitors between variants. See below.
  • Rotation — spread scans across destinations. See below.
  • Deep link — open your app on iPhone or Android when it's installed. Otherwise a phone with a Universal Link or App Link opens that link's web page, a phone with a store listing goes to it, and everything else (a computer, a Mac, a platform with nothing set) goes to the web fallback. You can give an iOS Universal Link, an app URL scheme and an App Store ID, and an Android App Link, app package and Play Store package; at least one app target is required. Opening a specific screen after a first install (deferred deep linking) isn't supported. Instagram, TikTok and Facebook's in-app browsers block app URL schemes, so those scans go straight to the store or the web fallback.

A/B splits and rotations

Both send one rule's scans to several destinations, and both come with Business.

An A/B split gives each new visitor one of 2 to 10 variants, by weight. Weights are whole percentages that add up to 100; set one to 0 to pause that variant. A visitor keeps the variant they were first given on every later scan (a cookie on our redirect domain remembers it for 90 days). Declaring a Winner sends every scan to that variant — including visitors already given another — and keeps the weights, so you can undo it. Saved variants can be paused but not removed or moved, so everyone keeps their variant and the analytics keep their history. If you change a split into another kind of rule and later make it a split again, that is a new experiment: returning visitors are given a variant afresh rather than the one they had before.

A rotation spreads scans across up to 50 destinations, with no memory of who got what:

  • Even share — destinations take turns, so each gets about the same number of scans. It is not a fixed order: scans are answered by many servers at once, each taking its own turns, so two scans in a row can reach the same destination. Over many scans the split evens out; over a handful it can be uneven.
  • Random — each scan picks a destination at random, by weight.

A destination can be switched off without losing its place.

If a matched split or rotation has nothing it can send to — every variant paused, every destination off — the scan moves on to the next rule, as if this one hadn't matched.

Warnings the rule list shows

The Rules tab checks your rule set as you build it:

  • This rule can never match — a rule above it matches every scan, has exactly the same conditions, or, for two rules the check compares (see the next point), already covers everything this one would.
  • Can both match the same scan — two rules whose conditions overlap; whichever comes first wins, so check the order is what you meant. This check is narrow. It compares two rules only when each has a single condition of the same kind, among: device type, operating system, in-app browser, day of week (on the same clock), returning visitor, GS1 link type, GS1 batch/lot, and country, continent, region or city when both say "is one of". It never compares time of day, date range, scan count, OS version, distance from a point or browser language — two overlapping lunch windows get no warning. A rule built from a group of conditions is checked only for being an exact copy of a rule above it, or for sitting below one that matches every scan; it is never checked for overlap or for being narrower. Rules on different kinds of condition (a device type above an operating system, say) aren't compared either. Test the order of all of those in the simulator.
  • Mac or iPad — on a device-type or operating-system condition that tells a Mac from an iPad: in Safari the two can't be told apart, so it matches neither. See the Device type entry above.
  • OS version — on every OS-version condition: the version is unknown for many browsers, and such a scan never matches. See the OS version entry above. A condition saved without saying which operating system it is about never matches any scan; the rule says so, and choosing iOS or Android fixes it.
  • Best-effort and no country-level safety net notes on region, city and distance rules.
  • A country, region or continent code that no scan ever reports — usually a typo — with a suggestion where there is one.

None of these stops you saving, because some overlaps are deliberate. Read them anyway: a routing mistake on a printed code doesn't produce an error, it sends real people to the wrong place.

When your plan changes

If your plan stops including routing rules, the rules on your codes keep routing scans exactly as they do now — a plan change never stops a printed code. You can still switch a rule off or delete it; changing one, or switching it back on, needs a plan with routing. See Plans and billing.

Before you print

Every change to rules is a draft until you publish it. Use the scan simulator to try the scans you expect — including a degraded-geo scan if you use region, city or distance — then publish.

Routing rules: the complete guide · QRtoMany