Elido
10 min readFeatures

Geo-Targeting Short Links: Route Clicks by Country

What geo-targeting short links means, where it pays off, how country routing runs at the edge, and the accuracy and GDPR caveats EU teams should plan for

Ana Kowalska
Marketing solutions engineering
One short link fanning out to German, US, and Japanese destinations based on the visitor's country

Geo-targeting short links means one short URL routes each click to a different destination based on the visitor's country or region. You publish a single slug, say elido.me/launch, print it on a flyer or drop it in a campaign, and a click from Berlin lands on your German store while a click from Chicago lands on the US one. There is one link to manage and one QR code to print. The destination is decided at the moment of the click, not when you created the link.

That is the whole idea, and it solves a problem every multi-region team hits: you have audiences in different countries, you have a page that fits each of them, and you do not want to maintain five separate links or ask people to pick their region from a menu. A geo redirect does the picking for them, silently, on the way through.

This post covers when geo-targeting earns its keep, how country routing works at the edge, the accuracy and privacy caveats that bite teams who skip them, and how location-based routing pairs with device and language targeting. There is a practical how-to at the end. None of it requires a separate redirect service or a JavaScript shim on a landing page.

Flow of a geo-targeted click: visitor click, IP read, country lookup, rule match sending DE to the German store and US to the US store, else a fallback, then a 302 redirect

Not every campaign needs country routing. The ones that do tend to fall into a handful of shapes, and it helps to know which one you are in before you build the rules.

Regional pricing and storefronts are the most common. If you run a store with a /de checkout priced in euros and a /us checkout in dollars, sending a German visitor to the dollar page costs you conversions and trust. A country redirect puts each visitor on the storefront that already speaks their currency and shipping terms. The same logic covers regional catalogs where availability differs by market.

Language and locale landing pages are next, though here country is a proxy, not the real signal. Routing a Japanese-IP click to a Japanese page works most of the time, but the cleaner approach is often to route on the browser's language preference, which we will get to. Use country when the market matters more than the reader's language, and language when the reverse is true.

Country-specific offers are a third case. A promotion that is legal and funded in France but not Italy can route French clicks to the offer and everyone else to the standard page. Market-by-market launches work the same way: flip each country to the live page as the rollout reaches it, leaving the rest on a coming-soon page.

App-store routing often rides alongside country rules. Sending iOS visitors to the App Store and Android visitors to Google Play is device targeting, but you frequently want the correct regional store entry too, which is where geo and device rules stack. We cover the mobile side in deep links for mobile apps without an SDK.

The last case is compliance. Sometimes you do not want to send certain regions to a different page; you want to block them, or send them to a notice. A gambling operator that cannot serve certain jurisdictions, or a campaign that must keep specific countries off a page for regulatory reasons, uses a geo-block as the inverse of a geo redirect. Routing and blocking are the same mechanism pointed in opposite directions.

The mechanics matter, because where the decision happens determines what it costs you in latency and what it exposes about your visitors.

Here is the sequence for a single click. A visitor taps the short link. The request lands at the Elido edge POP nearest to them. Before issuing the redirect, the edge reads the source IP address and looks it up against a GeoIP database to resolve a two-letter ISO 3166-1 country code, such as DE, US, or JP. That code is matched against your link's routing rules in order. The first rule whose country condition is satisfied wins, and its destination becomes the redirect target. If no rule matches, the link's fallback destination is used. The edge then writes a single 302 and the visitor's browser follows it to the right page.

The important detail is that all of this happens inside the same process that would otherwise issue a plain redirect. There is no call out to a third-party geo API, no extra network hop, no neutral HTML page that runs JavaScript and then bounces the visitor. The country lookup runs against an in-memory database, and your rules are compiled into fast matchers when the link first loads into the edge cache. The added work is sub-millisecond, so a geo-routed link stays inside the same p95 budget as a static one. We unpack the full routing model in smart links explained, and the reason it lives at the edge rather than behind a DNS-only product in edge POPs versus DNS-only routing.

The fallback is not optional, and that is deliberate. Geo data is imperfect, and a meaningful slice of every campaign will resolve to a country you did not write a rule for, or to no country at all. The fallback is what guarantees the link never dead-ends. A geo redirect with no default destination is a 404 waiting for the first VPN user, and we refuse to create one.

Accuracy and Privacy: The Caveats That Bite#

IP geolocation is an estimate, not a fact, and teams that treat it as a fact get surprised. Two separate issues deserve your attention before you ship: how accurate the lookup is, and what reading the IP means under GDPR.

On accuracy, the headline number is reassuring and the fine print is not. Country-level resolution is correct for the large majority of consumer traffic, in the range that MaxMind's GeoIP accuracy documentation publishes for its databases. City and region resolution is far less reliable, often only correct within a few tens of kilometers and sometimes wrong by a country's width. So route on country if you can, and be skeptical of any product that promises city-level precision for marketing decisions.

Several things break even the country lookup. A VPN places a visitor wherever the exit node sits, which is rarely where they are. Corporate networks can route all traffic through a gateway in one country, so a German employee of a US company might resolve to the US. Mobile carriers sometimes do the same. At scale these are not edge cases; on a large campaign you will see all three. The defense is always the same: a sensible fallback, and a willingness to verify against your own destination analytics rather than trusting the routing blind. Elido's click analytics show the country breakdown of real clicks so you can check whether the routing matches reality.

On privacy, the rule to internalize is that an IP address is personal data under GDPR. The Court of Justice of the European Union settled this in the Breyer judgment (Case C-582/14, ECLI:EU:C:2016:779), which held that a dynamic IP can identify a person when combined with information a controller can lawfully obtain. Reading the IP to compute a country is therefore a processing operation, and you should record it in your processing documentation.

What you should not do is keep the raw address around longer than the moment you need it. Elido truncates the IP before anything is written to the click record. The lookup happens, the country survives into your analytics, and the address itself is discarded, commonly by zeroing the final octet so what remains cannot single out a household. Your stored data holds country: DE, not 198.51.100.42. That truncation is the difference between a clean retention story and one your DPO will challenge. We go deeper on the residency mechanics in EU data residency for marketing analytics.

Geo Plus Device Plus Language: Stacking the Rules#

Country is one routing dimension, and the interesting campaigns combine it with others. An Elido smart link can match on country, device, OS, language, time-of-day, and referrer host in a single link, evaluated as an ordered list where the first match wins.

That ordering is the part people get wrong. Consider a French expat living in Berlin. Their IP resolves to country: DE, but their browser sends Accept-Language: fr. If your first rule routes German countries to /de, that visitor lands on the German page even though they would have preferred French. If you wanted them on /fr, the language rule has to come first. The rules are walked top to bottom, so the order you arrange them in is the policy you are actually shipping.

Three stacked rules in one smart link: a country rule, a device rule, and a language rule, evaluated first-match-wins with a fallback destination at the bottom

A worked example. Say you are launching an app and want German Android users on the German Play Store listing, German iOS users on the German App Store listing, and everyone else on a marketing page in their language where you have one. You would stack a country-plus-device rule for DE and Android, a second for DE and iOS, a language rule for the locales you support, and a catch-all fallback. The first visitor whose attributes satisfy a rule takes that destination; nobody falls through.

This is also where geo-targeting meets geo-blocking for compliance. A block is just a rule whose destination is a notice page or an HTTP error, placed first so it wins before any positive routing runs. If you must keep a set of countries off a page, the block rule fires at the top of the list and the rest of your routing never sees those clicks. Same engine, inverted intent. For routing that should stop after a date or a click count, link expiration and self-destructing links covers the time and quota controls that sit alongside geo rules, and password-protected short links covers gating access rather than redirecting it.

A Practical How-To#

Setting up a geo redirect in Elido takes a few minutes once you know the shape. Here is the path from a blank link to a tested one.

Create the link with its fallback first. The fallback is where every unmatched click goes, so make it the safe default: usually your primary-market or English page. This catches VPN users, unmapped countries, and clicks where the lookup failed.

Add your country rules in priority order. For regional storefronts, one rule per market: DE, AT, CH to the German store, FR, BE to the French store, grouping countries that share a destination. Put the most specific or most important rules at the top. If you mix in language or device conditions, decide which signal should win when they conflict and order accordingly, because first-match is the only tiebreaker.

Test before you publish widely. The honest way to verify country routing is to click the link from the regions you care about, which usually means a VPN or a colleague abroad, then confirm in Elido's analytics that the click resolved to the country you expected. Do not trust the rule list alone; trust what the destination saw. The smart links guide walks through the rule editor and the JSON schema if you are building rules through the API.

Watch the data after launch. The country breakdown in your analytics tells you whether the routing assumptions held. If a market is resolving to a different country at a surprising rate, that is your signal that a corporate gateway or a carrier is skewing the geo, and you may want to lean on language signals instead. Routing is a hypothesis; the click data is the test.

Geo-targeting earns its place in link management for marketers precisely because it is invisible when it works. The visitor never sees the decision. They tap one link, arrive somewhere that fits them, and you maintained exactly one slug. If you are still deciding whether you need conditional routing at all, what a URL shortener is starts from the basics, and the smart links feature page and deep links feature page show the routing surface in full. The residency and processing commitments behind all of it live on the trust page, and the plan that includes geo rules is on pricing.

Try Elido

EU-hosted URL shortener with custom domains, deep analytics, and an open API. Free tier - no credit card.

Tags
geo-targeting short links
geo targeting links
country redirect
location based url
regional landing pages
ip based redirect

Continue reading