Redirect by browser language: send each visitor to a page or offer in their language

November 28, 2026 · Hoplytic team · 5 min read

The short version: this guide in 67 seconds.
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

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 headerFirst languageLikely visitor
en-US,en;q=0.9en-USUS English speaker
de-CH,de;q=0.9,fr;q=0.8,en;q=0.7de-CHSwiss German speaker who also reads French and English
es-US,es;q=0.9,en;q=0.8es-USSpanish speaker in the US
pt-BRpt-BRBrazilian Portuguese
(missing)noneA 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.

Example: a US-only offer with an English and a Spanish landing page.

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

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.

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

  1. In your browser's language settings, move another language to the top of the list, then open the link.
  2. Test the base and a regional variant (es and es-MX) to confirm both match the way you intended.
  3. Test with no rule matching (for example Japanese) to confirm the fallback.
  4. 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.

Add another offer, set its share and countries, add it to the rotation.

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