Language versions (hreflang)
Are the language versions of a multilingual website linked to each other correctly?
What we check
This check concerns multilingual websites only. We look for hreflang entries on the home page, that is elements such as <link rel="alternate" hreflang="fr-CH" href="…">.
If there are none: we look at whether the page links to other languages, for example through a language selector or addresses such as /fr/ or /it/. If we find such links, the linking is missing and we warn.
If there are some, we check:
- whether the language codes are valid (
fr-CHyes,ch-frorfr-ch-chno), - whether a default version is given with
x-default(otherwise a note), - whether the addresses are complete, that is start with
https://, - whether the home page names itself in the list, and with the right language,
- whether the linked language versions are reachable,
- whether they refer back to the home page. For this we request up to four language versions.
Why it matters
In multilingual countries such as Switzerland, Belgium or Canada, and for websites with versions for several countries, customers search in different languages. hreflang tells Google which pages belong together in content and which language they are meant for. Google then shows each person the suitable version: in Lausanne the French one, in Zurich the German one.
Without hreflang, or with faulty entries, the following happens:
- People in French-speaking Switzerland land on the German page and leave.
- The language versions compete with each other in the search results.
- Google may take the translations for duplicate content.
Google only evaluates hreflang when the pages name each other. If the French page does not refer back to the German one, Google ignores the entry.
How to fix it
Every language version names all language versions in its head, itself included:
<link rel="alternate" hreflang="de-CH" href="https://www.example.ch/">
<link rel="alternate" hreflang="fr-CH" href="https://www.example.ch/fr/">
<link rel="alternate" hreflang="it-CH" href="https://www.example.ch/it/">
<link rel="alternate" hreflang="x-default" href="https://www.example.ch/">
The same list appears on all three pages.
- Language code first, then country code:
de-CH, notCH-de.chalone means the Chamorro language, not Switzerland. - Use full addresses with
https://. - Link the corresponding translation, not always just the home page of the other language.
WordPress
Multilingual plugins such as WPML, Polylang or TranslatePress create hreflang automatically as soon as the translations of a page are linked to each other. Missing entries usually mean that a page is not marked as a translation of the other.
Wix, Squarespace, Webflow
Wix Multilingual sets hreflang automatically. With other builders it depends on whether the language versions were created through the built-in multilingual feature or as separate pages. Only the former are linked.
How to check it yourself
Search the page source of the home page for hreflang. Repeat this on a language version and compare the lists. They should be identical.
Frequently asked questions
What is "x-default"?
An entry for visitors whose language the website does not offer. It usually points to a language selection page or the main language, e.g. the German home page. If it is missing, we give a note.
Do I need hreflang on subpages too?
Yes. Every page that exists in several languages should point to its counterparts, not only the home page. For time reasons we only check the home page.
My website is in German only. Do I have to do anything?
No. For single-language websites this check does not apply, and the score does not change as a result.
Check a website now
We check "Language versions (hreflang)" and all other points in a few minutes, free and without sign-up.
Related topics
-
Language details
Does the HTML of the home page state the language of the content?
-
Canonical tag
Does the home page tell Google its own valid address?
-
Sitemap
Does a valid sitemap show Google all pages of the website, without broken addresses and redirects?
-
Page title
Does the home page have a meaningful title that names its topic?