A typical scenario: a Shopify shop sells in 12 countries, each with its own subdomain, translated catalog, local currency and local payment gateway. The team hands out 12 different links to partners and creators — one per country. One partner mixes them up, another puts the Mexican link in a German blog, a third just shares en.shop.com everywhere. As a result, some visitors land in the wrong region, and those visits convert worse.
The fix is to give partners one link and let the server decide where to send each visitor. That is a geo-redirect. It looks simple but has a few traps: VPN, mismatches between country and language, and SEO. This post covers how to handle each.
A country-level geo-redirect on a good IP database is usually accurate. The language from the Accept-Language header helps with edge cases. A VPN gives a wrong country, so do not force those visitors anywhere and let them pick a country on your site. SEO needs canonical + hreflang, and a search crawler must never be shown something other than what people see. For most teams, a geo-redirect plus a visible “wrong region?” line on the landing page is enough.
How accurate is IP-based country detection?
Commercial IP databases (MaxMind GeoIP2, IP2Location, ipinfo, SypexGeo) paint roughly the same picture:
- Country: errors are rare. Good enough for a commercial redirect.
- Region (state): already noticeably worse. Online stores use it for tax and shipping; for a redirect it is usually overkill.
- City: misses are common, sometimes by tens of kilometres or into the next town. City-level redirects are almost always a bad idea.
Country-level errors come mostly from mobile networks and providers with infrastructure in several countries: an address can be registered to a Dutch network while the user is physically in Moscow. Such cases are few, but they happen.
In short, country-level redirects are reliable enough for commercial use. City-level ones need a language fallback.
Language: when IP is not enough
Sometimes the IP says one country but the user speaks a different language. Switzerland has four national languages: the IP says “CH”, and the Accept-Language header tells you which language to greet them in. Real examples:
- a German on a business trip in Italy (IP=IT, Accept-Language=de-DE);
- a Russian speaker in Germany (IP=DE, Accept-Language=ru-RU);
- an English-speaking expat in Japan (IP=JP, Accept-Language=en-US).
The rule we recommend: geo decides currency and payment, language decides the interface. The Swiss user sees Swiss prices and Swiss payment options, but the interface in their own language.
The Accept-Language header is often multi-part:
Accept-Language: de-DE, de;q=0.9, en;q=0.7, *;q=0.5
The user prefers German, then English. Parse it by weight (the q parameter). On your own server that is ten lines of code; in TDS.SO it is the “Language” condition in a rule.
VPN: the traffic that breaks geo
A noticeable share of visitors to commercial sites use a VPN: more on privacy-focused products and media, fewer on marketplaces. These people see geo that is not theirs. What to do:
- Do not block without a reason. Cutting off VPN traffic is tempting, but real people who value their privacy get blocked along with the bots. This hurts most on B2B audiences.
- Do not force a redirect to the “detected” country. Instead, show a line at the top of your site: “In the Netherlands? Pick another country”. The person confirms or changes the choice themselves.
- Remember the choice in a cookie for a year. Do not re-trigger the geo-redirect when the cookie already states a preference.
Good IP databases flag VPN addresses (is_proxy, type=hosting). Use that flag as a signal “geo is unreliable, ask the user”, not as a reason to refuse.
A hard geo-redirect with no confirmation line hurts expats and business travellers the most: the user is used to the US version, and from London gets bounced to the UK one — they assume they ended up in the wrong place. A country selector line at the top of the page is a small change.
SEO: canonical and hreflang
Search engines are wary of a URL that shows different things to different visitors. Showing the crawler something other than what people see can get a site removed from results. Two technical pieces make regional versions legitimate:
-
Canonical URL. Each localized version declares itself:
<link rel="canonical" href="https://es.shop.com/promo">. This tells Google the Spanish landing is a separate page, not a duplicate. -
hreflang. Each version lists all the others:
Googlebot follows the links and learns how the versions relate. Without them, your regional versions can compete with each other in search results.
<link rel="alternate" hreflang="es-ES" href="https://es.shop.com/promo"> <link rel="alternate" hreflang="es-MX" href="https://mx.shop.com/promo"> <link rel="alternate" hreflang="en" href="https://en.shop.com/promo"> <link rel="alternate" hreflang="x-default" href="https://en.shop.com/promo">
Googlebot itself is a separate story: it usually arrives from US IPs, and if you redirect it to en.shop.com, it will only index the English version. So search crawlers do not get a geo-redirect. The crawler should see each regional page at its own address, the same page people see.
This matters for TDS.SO links: the antibot counts search crawlers as bots, so they go to the default page for non-target traffic and skip your geo rules. A TDS.SO link should therefore not be the address you promote in search. Search results should list the regional pages themselves, with canonical and hreflang. Give the link to partners and use it in ads and newsletters.
When you do not need a geo-redirect at all
A geo-redirect is optional. In these cases it adds little:
- Single-country shop. If you only sell in the US, the extra logic does nothing.
- Content site without localization. Single-language blog, no regional versions. The visitor's browser handles the language.
- B2B SaaS with one global interface. With one English landing and one currency (USD) there is nowhere to redirect to.
- Landing tied to one ad campaign. If the ad network settings already target a specific country, visitors are already arriving from the right region.
What this looks like in TDS.SO
A geo-redirect in TDS.SO is a set of distribution rules on a link or a template: “if country = X, send to address Y”. A visitor who matches no rule goes to the link's main address.
For VPN traffic the rules have a “Proxy / VPN” condition: you can add a separate rule and send those visitors to, say, a country selection page on your own site. TDS.SO does not show a selection page itself, so you build it on your own site. Whether to block VPN, proxies and Tor outright is a separate filter setting; when it is on, those visits go to the default page for non-target traffic. The stats for every click show the detected country and city, the proxy flag and where the visitor was sent.
Conclusion
Three rules cover most cases:
- Redirect by country, not by city.
- Do not block VPN traffic without a reason or force it anywhere — let people pick a country on your site.
- Do not geo-redirect search crawlers, and tag your pages with canonical + hreflang.
With two or three markets and one currency you can skip the geo-redirect. With twelve countries and local payments you will want one. If you also need to route by device and source, look at a full smart-link, where geo is one of six signals.
Guides and write-ups on routing, bot filtering and tracking from the TDS.SO team.
All articles by the author