# hreflang

> The hreflang attribute gives the language of a linked page and lets a site tell search engines which pages are localised versions of the same content.

Original page: https://t10.de/en/glossary/hreflang
Publisher: total10 GmbH, https://t10.de/en/glossary

The attribute is defined in the [HTML Living Standard](https://html.spec.whatwg.org/multipage/links.html), the specification of HTML itself, which treats it as advisory only and requires its value to be a valid language tag, such as en or en-GB.

[Google](https://developers.google.com/search/docs/specialty/international/localized-versions) uses the annotations to understand how the versions belong together, not to identify their language: it uses neither hreflang nor the HTML lang attribute to detect the language of a page.

According to Google, the annotations must be reciprocal: each language version must list itself as well as all the others, and if two pages do not point to each other, the annotations are ignored. For visitors whose language none of the versions matches, Google suggests considering a fallback page marked with the value x-default. It names two cases in particular: language or country selector pages, and home pages that redirect automatically. That value is a Google convention and not part of the HTML standard.

In multilingual shops we maintain hreflang together with canonicals and sitemaps. In the SPQR project, German, English and Swedish run as separate shop versions, with hreflang set up correctly and product translations maintained centrally.

## See also

- [SEO](https://t10.de/en/glossary/seo): SEO, or search engine optimisation, is the work of helping search engines understand a site's content and helping people find the site through search and decide whether to visit it.
- [Canonical](https://t10.de/en/glossary/canonical): A canonical URL is the web address a search engine selects as the most representative of a set of pages with duplicate content; choosing it is called canonicalisation.

## Where the term appears

- [Technical SEO](https://t10.de/en/seo)
- [SPQR: three language storefronts](https://t10.de/en/portfolio/spqr)

## Sources

1. [Google über lokalisierte Versionen deiner Seite informieren](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=de), Google Search Central, accessed 2026-11-07
2. [HTML Living Standard, 4.6 Links](https://html.spec.whatwg.org/multipage/links.html), WHATWG, accessed 2026-11-07
