iCloud Private Relay and why city-level QR targeting is best-effort

Country targeting is reliable. Region, city and radius targeting are not, and the reason is on most iPhones. How to use geo routing without being misled.

By The QRtoMany team4 min read

Routing a QR code by location is one of the most useful things a dynamic code can do. A product sold in twelve countries can send each scan to the right language and currency. A touring event can send each city to its own date. It is also where QR services most often overpromise, because one level of location is reliable and the levels below it are not.

This post explains where the line is, why it exists, and how to build rules that stay correct on either side of it.

Where a scan's location comes from

When a code is scanned, the request reaches our servers at the network edge. The location attached to it comes from the IP address the request arrives from, looked up in the network provider's location database. We use the country, region and city from that lookup, and then we throw the IP address away. It is never stored. (More on that in how we count scans without storing IP addresses.)

So a scan's location is the location of the network address the phone used, which isn't always where the phone is.

What Private Relay changes

iCloud Private Relay is Apple's privacy feature for iCloud+ subscribers. When it is on, Safari's traffic leaves through relay servers, so websites see a relay's IP address instead of the phone's.

Apple designed it to keep a general location, so that sites can still show local content. That general location is reliable at the level of the country. Below that, it is only approximate:

  • someone in New York may appear to be in New Jersey;
  • someone in London may appear to be in Manchester;
  • with Private Relay's stricter setting, only the country and time zone are kept.

Private Relay is included with every iCloud+ subscription, and in most markets iPhones account for a large share of QR scans. Corporate VPNs and privacy tools such as Cloudflare WARP move people's apparent location in the same way.

We have no reliable way to tell, from a single request, that a scan came through a relay. So every region, city or distance rule has to be written knowing that some scans will be placed in the wrong region or city.

Why this is worse than it sounds

A location rule that gets it wrong doesn't throw an error. It fires for the wrong people, or fails to fire for the right ones, and nothing tells you. The dashboard shows scans and shows the rule matching. The numbers are simply off.

For a city-targeted campaign, that means some of the visitors standing in front of your poster in Manchester get the London page, and you never find out.

What is reliable, and what isn't

  • Country and continent: reliable. Build on them.
  • Region (state, province): best-effort. Right for most scans, wrong for some.
  • City: best-effort. Less reliable again than region.
  • Distance from a point (radius): best-effort. It uses the network location's coordinates, which are only as good as the city.

How to use city targeting safely

Treat region and city as a refinement on top of a country rule, never as the only rule. Rules are checked from the top and the first match wins, so:

  1. Put the specific rule first: region is Tokyo → the Tokyo launch event.
  2. Put a country rule directly beneath it: country is Japan → the Japanese site.
  3. Keep a sensible fallback for everyone else.

Then when location is right, the Tokyo scanner gets the event page. When it's wrong, they still get the Japanese site rather than the global page. The mistake costs a little relevance, not the whole visit.

Here is that rule set. Compare the first two scans: the same iPhone in Tokyo, once with an accurate location and once through Private Relay reading as Osaka.

Product launch packaging

A code on the box: a launch event in Tokyo, the Japanese site for the rest of Japan, a livestream in the evening, then the right app store.

Rules are checked from the top. The first enabled rule that matches the scan decides where it goes, and a scan no rule matches goes to the fallback. Pick a scan or set your own, and the rule that decides it is highlighted.

  • Japan (JP)

Leave empty to simulate a scan whose country is unknown (a VPN, or an address that can’t be placed).

  • 13

The region the scan comes from, in the country above — the code a real scan reports alongside its name. Best-effort for real scans. Leave blank to simulate as unknown.

In order of preference, the way a browser sends them — or paste a real Accept-Language header. Leave blank to simulate as unknown.

The instant of the simulated scan.

Used by rules set to "scanner's local time". Leave it blank for a scan from a location we can't place: like a real one, it's read in UTC.

More scan details — in-app browser, OS version, city, location, scan number, returning visitor, referrer

Browsers differ in what they report — see what a real scan from this one tells the edge below.

The version the device really runs. Leave blank for a current one — every phone reports some version.

A real scan reports the continent along with the country, so it's taken from the country unless you pick one.

As a scan reports it — usually the English name (Munich, not München); case and accents don’t matter. Leave blank for unknown.

For distance rules. A real scan is placed near its city's centre, and only roughly. Leave blank to simulate as unknown.

For distance rules. A real scan is placed near its city's centre, and only roughly. Leave blank to simulate as unknown.

Which of the code's counted scans this is — 1 is its first. Only scans that reach a destination count: not bots, and not scans that stop at a password or age prompt or a warning page. A scan limit of 100 serves scans 1 to 100. Real scans are counted approximately: when many people scan at the same moment some can get the same number, so a busy code may serve some past a limit or an "at most" rule. Leave it blank to simulate a scan made while the counter couldn't be read, which no scan-number rule matches.

No enabled rule here reads this, so this choice changes nothing — and a real scan of a code with these rules sets no returning-visitor cookie. Add a returning-visitor rule and scans are remembered from the moment it is published.

Leave blank to simulate this as unknown.

No version entered, so this tests a current iOS 26 — enter one to test another.

What a real scan from this device tells the edge: iOS 26.

The User-Agent this device's browser sends, which the edge reads: Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1

Resolves to https://example.com/launch/tokyo-event, via "Tokyo launch event".
  1. Tokyo launch eventMatched

    region is JP-13 — simulated value: JP-13

    → https://example.com/launch/tokyo-event

    Best-effort: Region, city and distance from a point are best-effort. They come from where the scanner's connection appears to be, and services like iCloud Private Relay and VPNs commit to country-level accuracy only, so this rule can fire for the wrong people or miss the right ones — country and continent rules are unaffected and stay reliable.

  2. JapanNot reached

    → https://example.com/launch/ja

  3. Evening livestream, 7–11pm scanner's timeNot reached

    → https://example.com/launch/livestream

  4. iPhoneNot reached

    → https://example.com/launch/app-store

  5. AndroidNot reached

    → https://example.com/launch/google-play

Your changes stay in this tab and are gone when you leave. On your own codes, routing rules come with Pro and above, and A/B splits and rotations with Business and above.

With Private Relay, the Tokyo rule misses and the country rule beneath it catches the scan. Without the country rule, that Tokyo visitor would have been sent to the evening livestream instead.

What the product does about it

We would rather show you this problem than hide it:

  • The rule builder marks region, city and radius as best-effort and says why.
  • If you save a rule that uses any of them with no country or continent rule beneath it to catch misplaced scans, you get a warning.
  • The dashboard's scan simulator can simulate a scan with degraded location, like the Private Relay scan above, and shows which of your rules would misfire.

We also don't sell city targeting as a headline feature, because it can't be as accurate as a headline promises.

Summary

Route by country freely. Route by region, city or distance only as a refinement, with a country rule under it, and test the degraded case before you print.

About the author

The QRtoMany team

We build QRtoMany, a dynamic QR code service designed around one fact: a printed code can't be recalled. These posts are written from what we have built, and the numbers in them come from the product itself.

Try the routing on your own codes

Create a free account to get started, then request Pro to route your own codes — or make a static code with no account at all.

All posts
iCloud Private Relay and why city-level QR targeting is best-effort · QRtoMany