AVANGARDISM
SEO and GEO glossary

hreflangLanguage version attribute

Definition

The hreflang attribute tells Google a page exists in several languages or for several countries, and which version to show to which searcher. It is declared in each page’s code, in the sitemap or in HTTP headers. Without it, Google may show searchers the wrong language version of a page.

Understanding it

Each version lists all the others, itself included: the French page points to the English one, and the English page to the French one. This two-way link is essential.

The x-default value names the page to show when no language matches, often a country selector.

Google states it does not use the HTML lang attribute to detect language: hreflang is what links the versions together.

A concrete example

Illustrative example: a French and English site

An agency publishes its site in French and English. Without hreflang, a British searcher sometimes lands on the French version in Google.

Each page now declares its French version, its English version and an x-default page. Google shows each searcher the right language.

The common mistake

Forgetting the return link

A French page pointing to the English one, with no link back, is ignored by Google. Each version must list all the others, using the same canonical addresses.

Frequently asked questions

hreflang: your questions

  • No. It is only useful when the same content exists in several languages or for several countries.