Testing Country Redirects: What You Should Check
Country-based redirects send visitors to the right regional site, until they loop, land on the wrong page or trap a user in one language. Here is what to check and how.
10 min readUpdated Nov 14, 2026By XPASS Editorial Team

Sending visitors to the version of a site that suits their country is a common feature. A shop redirects a visitor in Canada to its Canadian page, a software company sends German visitors to its German domain, a publisher shows a regional edition. When it works, nobody notices. When it fails, the symptoms are irritating: a loop that ends in an error page, a visitor stuck in a language they did not choose, a search engine crawler that never sees half the site, or an ad that lands on a page with the wrong currency.
This guide lists what to test, in what order, and how to see a redirect from the point of view of a visitor in another country. It assumes you are checking your own sites, a client's sites, or public pages that you are allowed to look at, and it keeps the volume of requests modest. It fits alongside the guides on tracking global campaign landing pages systematically and separating CDN problems from geo-targeting configuration, which cover the surrounding routine and the diagnosis when results look strange.
How country redirects usually work
A redirect is an HTTP response that tells the client to request a different address. The status code and the Location header carry the instruction, and RFC 9110 defines their meaning. A country redirect is simply a rule that chooses the destination based on where the request appears to come from. The decision can be made in several places:
- At the edge. A CDN or reverse proxy looks up the connecting address, maps it to a country and issues the redirect before the request reaches your application.
- In the application. Server code reads a country value, often provided by the edge as a header, and decides what to return.
- In the browser. JavaScript checks a location service or the browser language and changes
window.location. This kind of redirect happens after the page has loaded and is easy to miss with a simple command-line request. - Through a language header. The
Accept-Languagerequest header expresses the visitor's language preferences. Some sites redirect on that rather than on location, which is a different rule with different test cases.
Knowing which layer makes the decision tells you where to look when something goes wrong, and it tells you which tools can see the redirect at all. A command-line client will see a server-side redirect but not a JavaScript one. A full browser sees both.

What to check, in order
1. The status code and the type of redirect
Check the status code of every hop. For redirects that depend on the visitor's location, a temporary status such as 302 or 307 is normally appropriate, because the right destination can differ from visitor to visitor. A permanent status such as 301 or 308 tells clients the move is lasting, so browsers and shared caches may remember it. If a permanent redirect is sent to a visitor in one country and then cached on the path, later visitors from other countries could be sent to the wrong place. Record the code for each hop and flag any permanent redirect that depends on location.
2. The destination and the length of the chain
Write down the full chain: the starting URL, each intermediate address and the final address. Compare the final address with what you expect for that market. Then count the hops. A chain that goes from http to https, then from a bare domain to www, then to a country path, then to a language path is several round trips before the visitor sees anything. Where you can, combine rules so the visitor reaches the final address in one or two hops.
3. Query strings, fragments and tracking parameters
A common bug is a redirect that drops the query string, which strips campaign tracking parameters and breaks attribution. Request the URL with a realistic set of parameters and confirm they survive to the final address. Fragments (the part after #) are not sent to the server, so a server redirect cannot see them; browsers usually preserve them across redirects, but test this in a real browser if your pages depend on them.
4. Paths and deep links
Test more than the home page. A visitor who clicks a product link or an article link should land on the equivalent regional page, not be dumped on the regional home page. Check at least one deep path per market, including a page that exists only in some regions, and see what happens when the regional equivalent does not exist. The ideal is a clear page or a fallback to the global version, not an error.
5. Loops
Redirect loops appear when two rules disagree. For example, a location rule says "visitors in France go to the French site" and a language rule on the French site says "visitors whose browser prefers English go to the global site." A French visitor with an English browser may bounce between the two. Test combinations of location, browser language and cookie state, and watch for chains that repeat. Most clients stop after a limited number of hops and show an error, which is what your visitor would also see.
6. Cookies and remembered choices
Good implementations let the visitor choose a region and remember it. Verify that:
- a visitor who picks another region is not sent back on the next page view;
- the stored choice takes priority over automatic detection;
- clearing cookies returns the behaviour to the default;
- the choice persists on the paths you expect and does not leak to unrelated sites.
7. Search engine crawlers and discoverability
If automatic redirects block crawlers, or if crawlers only ever see one regional version, search visibility suffers. Look at how your pages declare alternatives, and check that crawlers can reach each regional version through normal links, not only through location-based redirects. Treat crawler behaviour as a separate test from visitor behaviour, and consult your search engine's published guidance on multi-regional sites.
8. Caching
Because the response depends on location, caches must know that. Look at the response headers that govern caching, especially whether the response is marked as varying by the information used to decide. A redirect cached without that awareness can be served to the wrong visitors. The reasoning for separating cache effects from rule effects is covered in the article on telling CDN issues from geo-targeting configuration.
9. Performance
Measure how long the redirect chain takes from the market you care about. A redirect to a distant origin adds round trips for the visitor. If one hop is slow, it is a candidate for moving to the edge or removing.
A test matrix you can reuse
Create a small matrix per site. The rows are the vantage points and the columns the conditions. Fill in the final address and the status of the first hop.
| Condition | Visitor in country A | Visitor in country B | Visitor in an unlisted country |
|---|---|---|---|
| Fresh browser, default language | Expected regional page | Expected regional page | Global or default page |
| Browser language differs from country | Check rule priority | Check rule priority | Check fallback |
| Regional choice already stored | Stored choice wins | Stored choice wins | Stored choice wins |
| Deep link to a product page | Equivalent regional page | Equivalent regional page | Global page |
| URL with tracking parameters | Parameters kept | Parameters kept | Parameters kept |
| Crawler user agent | Reachable regional versions | Reachable regional versions | Reachable default |
The matrix looks tedious, yet it is what turns a vague "redirects work" into evidence. Keep the filled-in version with the date, so that next time you can see exactly what changed.
How to see the redirect from another country
To observe what a visitor in another country sees, your request needs to look like it comes from there. Practical options include a colleague or partner in the market, a VPN for an occasional manual check, and a proxy with an address in the target country, which suits repeated checks and scripted requests. A proxy service places your test request on the route of an address in that market; MDN's explanation of proxy servers and tunneling describes the idea. Changing your browser language alone will not do it, since it does not change your apparent location.
Use two kinds of tool together. A command-line client shows each hop with status codes and headers, which is ideal for the first checks in the list above. A real browser shows client-side redirects and the page as a person would see it. Disable automatic redirect following in your command-line client for one pass, so you see the individual hops, and then enable it for a pass that shows the final result.
Keep the checks lawful and considerate. Test your own or your client's sites, or public pages in line with their terms and local law. Keep the request rate low, honour robots.txt as described in RFC 9309, and do not use a proxy to bypass access controls or any limit the site owner has set.
A short worked example
Suppose a retailer redirects visitors from Spain to its Spanish store. From a Spanish address you request the home page. The first response is a 302 to a path with a Spanish language code, then a second 302 adds a currency parameter, then a 200. Two hops, both temporary; good. Now you request a product URL with a campaign parameter. The first hop lands on the Spanish home page and the parameter is gone. That is two bugs at once: the deep link was lost and the tracking parameter dropped. You write down the request, the chain, the expected and actual final addresses, and send it to the developer.
Next you test with a browser set to English from the same Spanish address. The site now shows an English page with a banner offering to switch to Spanish. That is a sensible behaviour: the rule suggests rather than forces. You pick Spanish, reload, and confirm the choice persists. Finally you clear cookies and repeat to confirm it returns to the default.
Limits and what to watch for
- Location is inferred. Different data sources can map the same address to different places, so a test address might be treated differently from a real visitor's address.
- Results can be cached. If a result differs between two attempts, repeat after a pause and note the response headers, rather than assuming a rule changed.
- Not every redirect is visible to every tool. Client-side redirects need a real browser.
- Do not create side effects. Avoid testing flows that create orders, send emails or change accounts. Stop at the point where a page loads.
- Forced redirects have costs. Travelers, expatriates and people on shared or corporate networks may be sent to a version they do not want. Prefer a clear way to switch region.
- Respect the target. Keep volumes small and do not try to defeat any limit that the site has set.
Summary
Testing country redirects means checking more than "does it end up on the right page." Look at the status code of each hop, the length of the chain, the preservation of parameters and deep links, loops, remembered choices, crawler access, caching and performance. Use a matrix of locations and conditions, and see the redirect from the visitor's side with a lawful, low-volume approach that combines command-line and browser checks. Keep the evidence and rerun it whenever rules, CDN settings or language lists change.
If you want to run these checks from addresses in the markets you serve, the proxy page explains what the service includes and how to choose a plan.
Frequently asked questions
Which HTTP status code should a country redirect use?
Use a temporary redirect such as 302 or 307 for redirects that depend on the visitor's location, because the correct destination can differ between visitors. A permanent redirect such as 301 may be cached by browsers and caches, which can send later visitors to the wrong place.
How do I test a redirect for a country I am not in?
Request the page from a vantage point in that country, such as a colleague there or a lawful proxy with an address in that country, and record each hop of the redirect chain. A change of browser language alone does not change your apparent location.
What causes redirect loops between regional sites?
Loops usually happen when two rules disagree, for example one rule sends visitors to a regional site by location while another sends them back by language or by a cookie. Testing each combination of location, language and cookie state exposes them.
Should a country redirect be forced for every visitor?
Usually it is friendlier to suggest the regional site and let the visitor choose, and to remember that choice. Forced redirects can frustrate travelers, people using shared networks, and anyone whose location is detected wrongly.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a proxy for this?
XPASS Proxy sells residential proxy traffic by the gigabyte, with the price shown before you pay.
See proxy plansKeep reading

Proxy Guides
How to Track Global Campaign Landing Pages Systematically
A global campaign can quietly drift: redirects change, copy gets out of date, a regional variant breaks. Here is a simple, repeatable system for tracking every landing page by country.
10 min read

Proxy Guides
How to Tell CDN Problems from Geo-Targeting Configuration Problems
A visitor sees the wrong country version. Is the CDN serving a stale or mixed-up cache, or is the geo-targeting rule itself wrong? Here is a method to find out.
10 min read

Proxy Guides
How to Check Checkout Pages in Several Countries Without a Real Transaction
Checkout pages often change by country: currency, taxes, payment methods and address fields. Here is how to verify them from each market without placing a real order.
10 min read