Guide
Why not to redirect visitors by language or location
Do not send visitors to a language version automatically based on their IP address or browser settings. Google advises against redirecting users based on what you think their language may be, because it can stop both people and search engines from reaching all versions. Offer a clear switcher, use hreflang, and at most suggest another language with a dismissible note.
Why automatic redirects are tempting
The idea seems helpful: a visitor from Lausanne arrives, the server sees a Swiss IP address and a browser set to French, and sends them straight to the French pages. No switcher needed, no extra click.
In practice the guess is made from weak signals. An IP address shows roughly where a connection comes from, not what language the person reads. A browser's language setting may reflect the computer's purchase country, an employer's configuration or a default nobody changed. Switzerland adds its own twist: a Swiss IP address says nothing about whether the reader prefers German, French, Italian, Romansh or English.
What Google says
Google's guidance on multilingual sites asks site owners to avoid automatically redirecting users from one language version to another. Its reasoning: a redirect built on a guess about someone's language can stop both people and crawlers from ever seeing some of your versions. Links to the other versions are what it recommends instead 1.
The search-engine side of the problem is concrete. Crawlers do not arrive with the preferences of every reader, so if every request is redirected to one version according to where the crawler connects from, the other versions can become hard for it to reach. Then hreflang annotations point to pages the crawler cannot see consistently.
What goes wrong for people
- Travellers and commuters. A Ticino resident working in Zurich for the day gets German pages they did not ask for.
- Shared and work computers. One browser setting serves several people with different languages.
- Links that change meaning. Someone shares the French page with a colleague, the colleague's browser is set to German, and the link opens a different page from the one recommended.
- No way back. If the redirect fires again every time, choosing French from the switcher can bounce the reader straight back to German.
The last one is the worst, because the site then actively prevents the reader from doing what they asked.
What to do instead
Make the switcher do the work
A visible switcher in the header, with each language named in itself, is the primary route between versions. Our guide to switcher design covers placement and markup.
Use hreflang for search engines
Hreflang annotations let search engines choose which version to show in results, so readers arrive on the right language from the start without any redirect on your server. See hreflang explained.
Suggest, do not force
If you want to use the browser's language preference, use it to suggest rather than redirect. A small banner on the German page saying "Cette page existe aussi en français" with a link, shown only when the browser prefers French, gives the reader the choice. Follow these rules:
- Write the suggestion in the suggested language, so the reader can understand it.
- Let it be dismissed, and remember the dismissal for the session.
- Never show it to crawlers in a way that changes the content they index.
- Keep it out of the way of the main content and of keyboard focus order.
Decide what the root address does
With language folders, the bare domain needs an answer. A language chooser page, with each option named in its own language, is a clean solution and a natural x-default target. Serving one language at the root also works if that is documented and the switcher is prominent.
When location really matters
Some content genuinely depends on where the reader is, rather than what language they read: prices, delivery options, legal terms for a particular country. Treat that as a separate choice from language. A shop can ask "Where should we deliver?" and keep language as the reader's own choice, so a French-speaking customer in Zurich can read in French and still see Swiss prices.
Pages that change their content by location or language under a single address are harder to get right. Separate addresses per version, linked with hreflang, are the more predictable route.
Checking your site
- Open the site in a private window with your browser language set to something other than your usual one. Note whether you are redirected.
- Pick a deep page in each language and open its address directly. It should load as that language, without moving.
- Use the switcher to choose a language, then reload the page. You should stay in the language you chose.
- If a redirect exists, find out where it is configured: a plugin, the content system, the server or a content delivery network. Each needs a different fix.
Sources
Is your site redirecting visitors by location?
Send us the address. You will get an email saying whether we can take this on.
Ask about redirects