Redirect by browser language: send each visitor to a page or offer in their language
November 28, 2026 · Hoplytic team · 5 min read
Read the video transcript
How do you send each visitor to a page in the language they read?
Every browser sends an Accept-Language header, and a link can redirect on the first language in it.
Use country to pick the offer, and language to pick the page. Keep language rules for tracking links, not pages you want indexed. Payouts and shipping depend on where someone is. The page should be in what they read.
For a US-only offer, a Spanish speaker in the US gets the Spanish landing page. Other US visitors get the English page. Everyone outside the US gets a worldwide offer. Write rules so each visitor matches only the destinations you mean.
Match on the base language, not a regional variant, unless the content really differs. And bots send no language, so always keep a fallback.
In Hoplytic, open Rotation, add a destination, and choose More conditions, then Language. A rule of es matches es, es MX and es US. It combines with country and device, and is-not works for exclusions.
The full guide is right below. Hoplytic: ad tracking made simple.
Key points
- Browsers send an Accept-Language header with every request, listing the languages the person prefers, and a link can redirect on the first one.
- Language and country answer different questions: a Spanish speaker in the US needs a Spanish page but a US offer.
- Match on the base language (es) unless you really need the regional variant (es-MX), or you'll miss most visitors.
- Bots and some apps send no language at all, so a fallback destination is required, not optional.
- Use language redirects on tracking links, not on pages you want indexed: search engines advise against automatic language redirects on content pages.
Country targeting tells you where a visitor is. It doesn't tell you what they read. A Portuguese speaker in Switzerland, a French Canadian in Montreal and an English-speaking expat in Berlin all break the assumption that country equals language. The browser already says which language the person wants; a link can use it.
Short answer: every browser sends an Accept-Language header, such as es-US,es;q=0.9,en;q=0.8. A language redirect reads the first language in that list and sends the visitor to the destination with a matching rule, in the same server-side redirect. Match on the base language (es), combine it with country when the offer depends on location, and keep a fallback for visitors who send no language.
Where the language comes from
The header is built from the person's settings: the browser's language list on a computer, the phone's language on most mobile browsers. A few real examples:
| Accept-Language header | First language | Likely visitor |
|---|---|---|
en-US,en;q=0.9 | en-US | US English speaker |
de-CH,de;q=0.9,fr;q=0.8,en;q=0.7 | de-CH | Swiss German speaker who also reads French and English |
es-US,es;q=0.9,en;q=0.8 | es-US | Spanish speaker in the US |
pt-BR | pt-BR | Brazilian Portuguese |
| (missing) | none | A bot, a script, some in-app or embedded browsers |
The q values are weights for the second and later choices. For a redirect, the first language is nearly always the one that matters: it's what the person set as their main language.
Language vs country
They answer different questions, and good links use each for its own job.
- Country decides the offer. Payouts, shipping, licensing and the network's accepted geos depend on where the person is. See geo redirect links.
- Language decides the page. Your review, lander or the merchant's localized store should be in the language the person reads.
Example: a US-only offer with an English and a Spanish landing page.
- Country is US and language is
es→ the Spanish landing page. - Country is US and language is not
es→ the English landing page. - Country is not US → a worldwide offer.
Notice that every rule excludes the others. In many trackers a visitor who matches two destinations is split between them by weight, so a Spanish speaker in the US would otherwise land on the English page part of the time. Write rules so each visitor matches exactly the destinations you mean.
Base language or regional variant?
A language code can be the base (es, pt, fr) or include a region (es-MX, pt-BR, fr-CA). Visitors send whatever their device is set to, which is often a regional variant. If your rule says es-ES, a visitor sending es-MX or es-US won't match. Rules on the base language catch all of them.
Use a regional rule only when the content really differs: Brazilian vs European Portuguese, or a French Canadian page that mentions Canadian prices. Then make the base-language destination exclude it: pt-BR → the Brazilian page, pt but not pt-BR → the European page.
Where language redirects go wrong
- Devices left on English. Many people read in one language and never changed their phone from English. You'll send some of them an English page they'd rather read in their own language. Country-based hints on the page ("Leer en español") help.
- No header. Bots, link-preview fetchers and some apps send nothing. They must land on a fallback that works for anyone.
- Shared and work computers. An office machine set to English, used by a French speaker, sends
en. Nothing to do here except make switching language on the page easy. - SEO pages. For pages you want in search results, Google advises against automatically redirecting by perceived language: its crawler typically sends no Accept-Language header and would only ever see one version. Use language rules on tracking links and ad destinations, and use proper language tags with visible language links on indexed pages.
Language as a quality signal
Language is also a cheap sanity check on traffic. A campaign targeting Germany where a large share of clicks send en-US or no language at all deserves a closer look: that pattern can point to data-center traffic, VPN users or bots. Compare the language column against country in your click log before you scale a placement. More on this in bot clicks on affiliate links.
Language-aware merchant links
Some merchants and networks already localize the store by language or country on their side. Before building rules, open the offer's link with your browser set to another language and see what happens. If the merchant shows the right language by itself, your rule only needs to pick the right offer, not the right store page. If it doesn't, link to the localized store URL directly from the matching destination, for example /es/ or /de-de/ paths, and check that your sub-ID survives on those deep links with a redirect checker.
Testing
- In your browser's language settings, move another language to the top of the list, then open the link.
- Test the base and a regional variant (
esandes-MX) to confirm both match the way you intended. - Test with no rule matching (for example Japanese) to confirm the fallback.
- Change the setting back, and check the click log shows each test's language and destination.
How to do this in Hoplytic
Open a link, go to Rotation, add a destination and use More conditions → Language, with values such as es, de or pt-BR. Hoplytic reads the first language the browser asks for. A rule of es matches es, es-MX and es-US; a rule of pt-BR matches only Brazilian Portuguese. Language combines with country, device and the other conditions on the same destination, and "is not" works for exclusions. Setup details are in rotators and backup links.
Questions people ask
How does a website know my browser language?
Your browser sends an Accept-Language header with every request, for example 'de-DE,de;q=0.9,en;q=0.8'. It comes from your browser or phone language settings, not from your location.
Is it better to redirect by language or by country?
By country when the offer depends on where the person is (shipping, payouts, licenses). By language when the page or creative depends on what they read. Many links need both: country picks the offer, language picks the page.
Does a VPN change my browser language?
No. A VPN changes your apparent country, not the Accept-Language header. That's one reason language can be a useful check against country data.
More in Tracking fundamentals
Also: tracking glossary · ad platform macros · Markdown copy