Hreflang

What is Hreflang?

Hreflang is an HTML and HTTP-header annotation that tells search engines which language and regional variant of a page should be served to which audience. It is one of the most important technical SEO signals for any storefront operating across multiple markets, and it is notoriously easy to misconfigure.

Definition

Hreflang takes the form of rel="alternate" hreflang="de-CH" links pointing from each localized page to all of its siblings, including itself. The value combines an ISO 639-1 language code with an optional ISO 3166-1 alpha-2 region code, for example en-GB, de-AT, or fr-CA. A special value, x-default, marks the fallback URL for users whose locale is not explicitly covered. Hreflang can be declared in the HTML head, in HTTP headers for non-HTML assets, or in an XML sitemap. The cluster must be bidirectional: if de-DE points to de-CH, de-CH must point back to de-DE.

Why it matters

Without hreflang, Google may rank the wrong locale for a query — a Swiss shopper might see /de/de/ pricing in EUR instead of /de/ch/ pricing in CHF — leading to bounce, lost trust, and wasted ad spend. In a Composable-Commerce stack with many automatically generated locale variants, missing or self-contradicting hreflang clusters can suppress entire markets in organic search. Hreflang interacts tightly with Locale Routing, Domain Strategy, and canonical tags, so changes propagate quickly across the indexable surface.

Use cases

A multi-region storefront generates hreflang clusters automatically from its CMS locale tree, so adding a new market like nl-BE updates every existing page in the same release. A retailer with both /en/us/ and /en/gb/ trees uses hreflang to disambiguate near-duplicate content and avoid cannibalization. A brand consolidating from ccTLDs to a single subfolder Domain Strategy uses hreflang plus 301 redirects to preserve SEO equity. Edge functions can also inject hreflang headers for PDFs, RSS feeds, or AMP variants where the HTML head is unavailable. In each case, hreflang is the contract between i18n, SEO, and the user's actual locale expectations.

Explore Multi-Brand and Multi-Market · SEO and GEO.

Frontend Insights