A multilingual website and Google: separate addresses and hreflang
Is your website online in multiple languages, for example in Dutch, English and German? Then you want someone who searches in German to see the German page in Google, not the Dutch one. Two things are needed for that: a unique address per language, and hreflang, a reference that tells Google which pages are translations of each other. In this article you'll read how that works and how to check it. We use example.com as an example.
Each language its own address
Google recommends a unique address per language version, for example:
https://example.com/bruidsboeketten (Nederlands) https://example.com/en/bridal-bouquets (Engels) https://example.com/de/brautstraeusse (Duits)
So don't switch the language on the same address with a cookie or a browser setting. Google usually fetches pages from the United States; if the content of an address changes per visitor, Google might only see one version.
Also don't automatically redirect visitors to a different language based on their browser language or their location. Google explicitly advises against this. A Dutch person on holiday in Germany simply wants the Dutch site. It's better to put a clear language selector on every page, so everyone can reach every version.
What hreflang looks like
In the <head> of each language version, the same set of rules appears:
<link rel="alternate" hreflang="nl" href="https://example.com/bruidsboeketten"> <link rel="alternate" hreflang="en" href="https://example.com/en/bridal-bouquets"> <link rel="alternate" hreflang="de" href="https://example.com/de/brautstraeusse"> <link rel="alternate" hreflang="x-default" href="https://example.com/bruidsboeketten">
Four rules to remember:
- Each version names itself and all the others. The English page has exactly the same four lines, including the one for
en. - Reciprocal. If the Dutch page points to the German one, the German one must point back to the Dutch one. If it doesn't, Google ignores the reference. This is the mistake that occurs most often.
- Full addresses, including
https://, and only addresses that open directly: no redirect, no 404 and no noindex. - Each version has a canonical pointing to itself. The English page is not a copy of the Dutch one. If it points to the Dutch one with a canonical, it can disappear from Google.
x-default is not mandatory. You use it to designate the page for everyone for whom none of your languages fits, often your main language or a page where you choose a language.
Hreflang can also be used as a server header (handy for a pdf) or in the sitemap. Choose one method. If you use more than one, they must say exactly the same thing.
The codes
| Code | Meaning |
|---|---|
nl, en, de | A language, for everyone who speaks that language |
nl-BE | Dutch for Belgium |
en-GB | English for the United Kingdom (not en-UK: that code doesn't work) |
x-default | The fallback page |
The language always comes first. A country alone doesn't work: hreflang="be" means Belarusian, not Belgium. Only use a country when the versions really differ, for example in prices, delivery or spelling. If you have one German version for everyone, just use de.
Also set the correct language in the lang attribute on every page, like <html lang="de">. Google determines the language of a page itself from the text, but browsers, translation tools and screen readers do use the attribute.
How it works in the AI Builder
If you add a language in the AI Builder, the main language stays on the main address and every other language gets its own folder, like /en/. Every page gets hreflang references to the same page in the other languages, and an x-default pointing to the main language. News items only exist in the main language and therefore have no hreflang. Visitors switch language using the language selector in the menu; the AI Builder never redirects anyone automatically. If a visitor's browser is set to a different language of your site, they might at most see a small bar with a link to that language.
In WordPress, a multilingual plugin handles the hreflang. With other website builders you'll find it under names like "languages" or "international".
Checking
- Open a page, right-click and choose View Page Source (or Ctrl+U). Use Ctrl+F to search for
hreflang. - Is there a line for every language, including the language of the page itself? Are the addresses complete?
- Open one of the other language versions and check whether it has exactly the same set, with a reference back.
- Click the addresses: each address must open directly, without a redirect.
- Also look for
canonical: that should point to the address of the page itself.
