hreflang
An attribute that tells search engines which language and region version of a page to show, with x-default naming the fallback.
Updated August 14, 2026
hreflang is the attribute that connects the language versions of one page to each other, so a search engine can show a reader the version written for them. It is declared as <link rel="alternate" hreflang="de-AT" href="…"> in the head of a page, or equivalently in HTTP headers or a sitemap. The value is a language code, optionally narrowed by region, and the special value x-default marks the version to serve anyone whose language matches nothing else.
Two rules make the set valid. The annotations must be reciprocal: every version lists every version, itself included, or search engines discard the group. And each address given must be the final canonical one — not a redirect and not a tracking address, which is where a redirect chain silently breaks the group. A link checker shows where each address really ends up.
For short links the distinction to keep clear is who is being told what. Language targeting on a link decides where a person lands when they click; hreflang decides which version a search engine indexes and offers. One does not substitute for the other, so annotate the destination pages regardless of how the link routes.