Skip to main content

Glossary H

Glossary · E-commerce

hreflang

Area
E-commerce
Related
SEO, Canonical

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.

The attribute is defined in the HTML Living Standard, 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 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.

Where the term appears

Sources

  1. HTML Living Standard, 4.6 Links (opens in a new tab)

    WHATWG accessed

Let's talk about your project.

If this term is on your desk right now, a conversation usually helps faster than any definition.

Search the website

Popular topics

All results