QA & localisation · Geo redirect testing
Geo redirect testing: redirects, hreflang and banners by country
A geo redirect sends a visitor to a country or language version based on where their IP address resolves and what their browser asks for. To test it, the request has to leave from the country, and the browser has to speak that market's language and keep its clock, or the test exercises a visitor who does not exist.
Pay per GB · No subscription · Prices in EUR, excl. VAT
- €2.00
- per GB on ARC Fast, excl. VAT
- −44%
- at 1 TB (€1.12 / GB)
- 185+
- countries, city targeting
- Never
- expires — no subscription
Written for
- QA and test automation engineers
- International SEO specialists
- Localisation teams
- Front-end and CDN engineers
The short answer
- A geo redirect usually reads two inputs: the country your IP resolves to and the browser's
Accept-Language. A proxy exit changes the first. Your test has to set the second, and the timezone, itself. - In our run on 2026-11-02, headless Chromium under Playwright 1.54 sent no
Accept-Languageheader at all unlesslocalewas set, and reported the test machine's timezone. An exit in Japan with a Berlin clock and no language is not a Japanese visitor. - Google advises against redirecting automatically by perceived language and against adapting content by IP. Its crawler's default IPs appear US-based and send no
Accept-Language, so every locale URL should answer from a US exit with no language header. - Sending your CDN's country header straight to the origin tests the origin's branching only. An exit in the market tests the whole chain: CDN geolocation, cache key and origin.
- Start every test cell in a fresh browser context. A stored region cookie from the last run overrides the geo logic you meant to test.
The problem
What goes wrong without the right IPs
The office sees one branch
The redirect, the currency and the region banner all branch on location. From the office, and from a CI runner in one cloud region, you exercise exactly one of those branches on every run.
Faking the country header skips the CDN
Many origins trust a country header added by the CDN. Sending that header yourself, straight to the origin, proves the origin's mapping works. It says nothing about how the CDN geolocates a real visitor or what it caches.
Exit and browser disagree
A proxy moves the IP address and nothing else. The browser still sends your language, or none, and reports your timezone. A site that reads both sees a mismatch, and your test records a page no real visitor gets.
A cached redirect leaks across countries
If a redirect response is cached on the URL alone, the first visitor's country decides where everyone after them goes. It only shows when two markets hit the same edge in sequence.
Redirects hide locale pages from crawlers
A redirect that sends every US visitor without a language preference to one version can keep a crawler from ever reaching the others. The pages exist, but only for visitors the crawler never imitates.
What to collect
What you can collect
- Redirect chain
- Status code and
Locationof every hop, per market. The assertion is the target, and that it is a 302 or 307 where the decision depends on the visitor. - Final URL and status
- Where the visitor lands and whether that page answers 200. A redirect to a 404 locale is a common release bug.
- Cache headers on the redirect
Cache-ControlandVaryon the hop that branches. A cacheable geo redirect without a country in the cache key is a leak waiting for traffic.- Page language
<html lang>andContent-Languageon the final page, to catch the right URL serving the wrong strings.- hreflang set
- The alternates the final page declares, and whether each target links back. Collected per market because some sites change the markup by country.
- Region banner and currency
- "You seem to be in…" prompts, the currency shown and the price format. These are the visible symptoms users report.
- Visitor profile
- Exit IP and its country as the target saw it,
Accept-Language, browser locale and timezone. Without these, a failed run cannot be reproduced.
How it runs
How a collection run works
- 01
Rehearse against a local server first
Before pointing a test at production, run it against a toy origin that redirects on the source address, so you can see which inputs your harness actually sends. This is the server our run on 2026-11-02 used, with a two-line lookup table standing in for a geolocation database and a small local forward proxy whose outbound address is
::1.server.py: redirect on the source IP, log what arrived27 linesimport socketfrom http.server import BaseHTTPRequestHandler, ThreadingHTTPServerGEOIP = {"::ffff:127.0.0.1": "DE", "::1": "JP"} # stand-in for a GeoIP databaseSITES = {"DE": "/de-de/", "JP": "/ja-jp/"} # anything else: /en/ (x-default)class H(BaseHTTPRequestHandler): def do_GET(self): ip = self.client_address[0] cc = GEOIP.get(ip, "??") lang = (self.headers.get("Accept-Language") or "-").split(",")[0] if self.path == "/": self.send_response(302) self.send_header("Location", SITES.get(cc, "/en/")) self.send_header("Cache-Control", "private, no-store") else: self.send_response(200) self.end_headers() print(f"{self.path:8} ip={ip:18} cc={cc} accept-language={lang}", flush=True)class DualStack(ThreadingHTTPServer): address_family = socket.AF_INET6 def server_bind(self): self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0) super().server_bind()DualStack(("::", 8088), H).serve_forever() - 02
Check the redirect chain with plain HTTP
A redirect is decided before any page renders, so most checks need no browser. Fetch each URL once per market with that market's
Accept-Language, record every hop, and keep the cache headers of the hop that branches. Rotating ARC Basic exits are enough here. We ran this function against the local server above on 2026-11-02 with the proxy URL swapped.Every hop of the redirect chain, per market31 linesimport requestsGATEWAY, PASSWORD = "proxy.arcproxies.io:8000", "PASSWORD"# country token -> (Accept-Language, browser locale, timezone, city token or None)MARKETS = { "de": ("de-DE,de;q=0.9,en;q=0.8", "de-DE", "Europe/Berlin", None), "jp": ("ja-JP,ja;q=0.9,en;q=0.8", "ja-JP", "Asia/Tokyo", None), "us": ("en-US,en;q=0.9", "en-US", "America/New_York", "newyork"),}def username(country, pool="arc", session=None): user = f"USERNAME_pool-{pool}_country-{country}" if MARKETS[country][3]: user += f"_city-{MARKETS[country][3]}" if session: user += f"_session-{session}_sesstime-10" return userdef redirect_chain(url, country, proxy=None): proxy = proxy or f"http://{username(country)}:{PASSWORD}@{GATEWAY}" r = requests.get(url, proxies={"http": proxy, "https": proxy}, headers={"Accept-Language": MARKETS[country][0]}, timeout=20) first = r.history[0].headers if r.history else {} return {"country": country, "hops": [(h.status_code, h.headers.get("Location")) for h in r.history], "final": r.url, "status": r.status_code, "cache_control": first.get("Cache-Control"), "vary": first.get("Vary")}for cc in MARKETS: print(redirect_chain("https://www.example.com/", cc)) - 03
Render with language and clock matched to the exit
For region banners, currency and anything assembled by scripts, load the page in a browser whose
localeandtimezone_idmatch the exit, in a fresh context, on one sticky session so the redirect and the final page come from the same visitor.Playwright: exit, locale and timezone from one market19 linesfrom playwright.sync_api import sync_playwrightdef rendered_visit(url, country, session): _, locale, tz, _ = MARKETS[country] proxy = {"server": f"http://{GATEWAY}", "username": username(country, "arcfast", session), "password": PASSWORD} with sync_playwright() as p: browser = p.chromium.launch(proxy=proxy) ctx = browser.new_context(locale=locale, timezone_id=tz) # fresh: no region cookie page = ctx.new_page() page.goto(url, wait_until="domcontentloaded") out = {"country": country, "final": page.url, "html_lang": page.get_attribute("html", "lang"), "hreflang": page.eval_on_selector_all( 'link[rel="alternate"][hreflang]', "els => els.map(e => [e.hreflang, e.href])"), "browser": page.evaluate( "() => [navigator.language, Intl.DateTimeFormat().resolvedOptions().timeZone]")} browser.close() return out - 04
Assert against the exit the server saw, not the label in your code
In our local run, the harness labelled three runs
de,jpandus, and all three landed on/ja-jp/, because the one local proxy had one exit. Your runner's market label is a wish; the exit country is the fact. Log the exit with every result, check it with the proxy location checker, and fail the test on a mismatch before you assert the redirect.
Setup
Recommended setup
Redirect checks are small and stateless; rendered checks are a short session per market. Split them across pools by that.
| Plan | Role | Session | Targeting | Price |
|---|---|---|---|---|
ARC Basic Rotating ISP | Default for redirect-chain checks Our lowest price per GB, for the frequent plain-HTTP check: which URL does this market get, with which status and cache headers. | Rotating, one request per check | Country + city | €0.75 / GB €0.59 at 1 TB (−21%) |
ARC Fast Rotating residential | For rendered checks Residential exits held for the redirect, the final page and any banner interaction, so all of it comes from one visitor. City targeting places a US test in a state. | Sticky, 10 minutes per test cell | Country + city | €2.00 / GB €1.12 at 1 TB (−44%) |
ARC Mobile Mobile 4G/5G | For carrier-network checks Carrier IPs, for sites that branch differently on mobile networks. Four countries, no city targeting. | Sticky, 5 to 60 minutes | Country (DE, GB, US, JP) | €3.50 / GB €3.15 at 1 TB (−10%) |
Prices are list prices in EUR, excl. VAT. Volume discounts apply automatically at checkout — full ladder on the pricing page.
Connect
One connection string per market
The country, city and sticky session are tokens in the username. Change the token, change the market; keep the session handle, keep the IP.
http://USERNAME_pool-arcfast_country-de_session-k3f9a1x2_sesstime-10:PASSWORD@proxy.arcproxies.io:8000Swap _country-de for any market you quote. The full grammar is on the residential proxies page.
Illustration
What a daily redirect check of 300 URLs in 12 markets costs
An illustration with round numbers — your pages, payloads and retry rate will differ. The arithmetic is the real price ladder.
Assumptions
- URLs
- 300 (home, category and campaign landings)
- Markets
- 12
- Cadence
- daily, 30 days
- Weight per check
- 0.15 MB: redirect hop plus final HTML, no assets (assumed)
- Bandwidth per month
- ≈ 17 GB
On ARC Basic
€12.75per month, excl. VAT
17 GB bought in one purchase at €0.75 / GB (list price).
The same 17 GB on ARC Fast: €34.00 at €2.00 / GB. Route only the jobs that need it through the pricier pool.
The weight per check is an assumption; fetch a sample of your own URLs once and divide the bytes by the number of checks. Rendered runs cost far more per check, so run them weekly and on release, and keep the daily job to plain HTTP. Bandwidth does not expire.
Bandwidth never expires, so a bigger single purchase is only ever cheaper per GB. See the ladder.
In depth
Geo redirect testing, in depth
What a proxy exit reproduces, and what it does not
A proxy changes the address your request arrives from. Everything a site derives from that address follows: the GeoIP country, the country header your CDN adds, the currency it guesses. Everything the browser itself reports stays as it was. A test that only changes the exit mixes a foreign IP with your own language and clock.
| Input a site can read | Changed by the exit? | How to set it in a test |
|---|---|---|
| Source IP and its GeoIP country | Yes | Country or city token in the proxy username |
CDN country header (for example CF-IPCountry) | Yes, the CDN derives it from the exit | Nothing to set; do not send it yourself when testing through the CDN |
Accept-Language header | No | Playwright locale, or the header directly in plain HTTP |
navigator.language | No | Playwright locale |
Timezone (Intl, Date) | No | Playwright timezone_id |
| Browser geolocation API | No | geolocation plus the permission; it is a GPS-style position, not the IP |
| Stored region or consent cookie | No | A fresh context per test cell |
| Signed-in account country, payment card country | No | Test accounts per market, where your own system supports them |
Playwright documents that locale sets both navigator.language and the Accept-Language request header. MDN notes that browsers set the header from their interface language, and that a server should never override a language the user chose explicitly.
Our run on 2026-11-02: one toy server, one local proxy
The server above mapped 127.0.0.1 to Germany and ::1 to Japan. A local forward proxy on port 3128 connected to the server over ::1, so anything sent through it arrived from "Japan". curl 8.7.1 and Playwright 1.54 (Chromium 139) on macOS. These are the requests and what the server logged.
| Request | Server saw | Result |
|---|---|---|
| curl, direct | 127.0.0.1, DE, no Accept-Language | 302 to /de-de/ |
| curl through the proxy | ::1, JP, no Accept-Language | 302 to /ja-jp/ |
curl through the proxy, Accept-Language: de-DE | ::1, JP, de-DE | 302 to /ja-jp/: the IP decided, the header did not |
curl direct, X-Country: JP, origin ignores the header | 127.0.0.1, DE | 302 to /de-de/ |
curl direct, X-Country: JP, origin trusts the header | 127.0.0.1, header JP | 302 to /ja-jp/: origin logic tested, geolocation not |
Playwright through the proxy, no locale | ::1, JP, no Accept-Language | /ja-jp/; browser reported en-US and Europe/Berlin |
Playwright through the proxy, ja-JP, Asia/Tokyo | ::1, JP, ja-JP | /ja-jp/; browser reported ja-JP and Asia/Tokyo |
A raw header dump of the same headless Chromium, without locale, showed no Accept-Language line at all and a HeadlessChrome user agent. A site that branches on language falls through to its default for that request, whatever the exit.
Some sites redirect on language alone. The same day, from one exit, developers.google.com answered a documentation URL with 200 for Accept-Language: en-US and with a 302 to ?hl=de and ?hl=ja for de-DE and ja-JP. A test that changed only the exit would have missed that branch completely.
What Google says about geo redirects and hreflang
Google's guidance on multi-regional sites says to avoid automatically redirecting users from one language version to another based on what you think their language is, and not to use IP analysis to adapt content. Its page on locale-adaptive pages says the default IPs of Googlebot appear to be based in the USA, that it also crawls from IPs outside the USA, and that it sends requests without setting Accept-Language. It recommends separate URLs per locale, annotated with hreflang.
For hreflang itself, each language version must list itself and all other versions, a page that links to another must be linked back, codes are ISO 639-1 for language and ISO 3166-1 alpha-2 for region, and a region code on its own is not valid. x-default is the version for visitors no other entry matches.
- Every locale URL answers 200 from a US exit with no `Accept-Language`. That is roughly the request a crawler makes. A redirect away from the URL means the crawler can only see it through hreflang links it may not follow.
- hreflang is reciprocal on every page you sampled. Parse the set from each final page and check each target returns the link.
- The hreflang set is the same from every market. Validation alone does not need a proxy, because the annotations sit in HTML, headers or the sitemap. It does need one when your site serves different markup by country, and that is the case to rule out.
- The x-default target exists and does not redirect by country itself.
Works with anything that takes a proxy URL
Playwright
- curl
- Python requests / httpx
- Selenium
- Puppeteer
- Docker
FAQ
Questions
Something not covered? Write to contact@arcproxies.io.
How do I test a geo redirect from another country?
Request the URL through a proxy exit in that country, with the browser language and timezone of that country, in a fresh session, and record every redirect hop. Check the exit really is in the country before you trust the result; the proxy location checker does that in one request.
Why does my site still show English through a German proxy?
Because the proxy changes the IP and nothing else. If the site reads Accept-Language or the browser locale, it still sees yours, or none: headless Chromium sent no Accept-Language at all in our 2026-11-02 run until locale was set. Set locale and timezone_id to match the exit.
Can I test geo redirects without a proxy?
Partly. If your origin trusts a country header from the CDN, you can send that header straight to the origin in staging, which tests the origin's mapping. It does not test how the CDN geolocates real visitors or what it caches, which is where production bugs tend to be.
Should I redirect visitors by IP at all?
Google advises against automatic redirects based on perceived language and against adapting content by IP, and recommends separate locale URLs with hreflang plus visible links to switch. If you keep a redirect or banner, test that every locale URL is still reachable without it.
Does checking hreflang need a proxy?
Not for validation: the annotations are in the HTML, the HTTP headers or the sitemap, the same for everyone. It does when your site might serve different markup or redirects by country, because then each market has to be fetched from inside it to compare.
Which countries and cities can I test from?
ARC Basic, Fast and Ultra take a country token for 185+ countries and a city token for a published list of metros in twelve of them, including six US cities that place a test in a state. ARC Mobile covers Germany, the UK, the US and Japan, without city targeting.
Sources & review
Last reviewed by the ARC Proxies team. Prices are read from the live catalog at build time.
- [1]Google Search Central: Managing multi-regional and multilingual sites
- [2]Google Search Central: How Google crawls locale-adaptive pages
- [3]Google Search Central: Tell Google about localized versions of your page
- [4]MDN Web Docs: Accept-Language header
- [5]MDN Web Docs: Vary header
- [6]Playwright: Browser: browser.newContext() options
- [7]Cloudflare Docs: Cloudflare HTTP headers
QA & localisation
More on qa & localisation
Get started
Buy a gigabyte and try it on your own targets.
No subscription, no sales call. Code WELCOME15 takes 15% off your first purchase, and whatever you do not use is still there next quarter.