hreflang
An HTML attribute or sitemap tag that tells search engines which language and region a page is intended for, so the right version is shown to the right user.
Definition
hreflang is an attribute used in `<link rel="alternate">` tags, HTTP headers or XML sitemaps that signals the language — and optionally the geographic region — a page is intended for, helping search engines serve the appropriate localised version to the user.
Google says hreflang is a signal, not a directive: it can still choose to serve a different URL if other signals (such as the user's language settings or the canonical tag) point elsewhere. hreflang values follow the ISO 639-1 language code, optionally combined with an ISO 3166-1 Alpha 2 region code (`en`, `en-gb`, `en-au`). The reciprocal-link rule applies — every page in the language set must link back to every other page, including itself.
Examples
UK vs US versions of a product page
A retailer runs `example.com/uk/shoes` and `example.com/us/shoes`. Each page declares the other in hreflang: `<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/shoes" />` and `<link rel="alternate" hreflang="en-us" href="https://example.com/us/shoes" />`, plus a self-reference for each.
Default for unmatched locales
A site adds `<link rel="alternate" hreflang="x-default" href="https://example.com/" />` so Google has a fallback URL to show users whose language and region don't match any specific localised version.
Sources
Related terms
Where QueryCatch uses this
Last updated: 2026-05-10