Term
Hreflang Explained

Hreflang is an HTML attribute that tells search engines which language and region a page is intended for, so they can show the right version to the right user. On a site with multiple language or country variants of the same page, hreflang maps those versions to each other and specifies who each one is for — say, English for the US, English for the UK, German for Germany — so a searcher lands on the version meant for them.

The problem hreflang solves is serving the wrong version. Without it, Google might show US visitors a UK page with the wrong currency and spelling, or treat near-identical language variants as duplicate content competing against each other. Hreflang resolves both: it signals that these pages are alternates of one another, not duplicates, and directs each user to their correct regional or language version.

Hreflang values combine a language code and an optional region code, and one rule is easy to get wrong:

  • Language onlyen (English), de (German), fr (French)
  • Language + regionen-us (English, US), en-gb (English, UK), de-at (German, Austria)
  • x-default — a fallback for users who don’t match any specified version
  • Reciprocity rule — every page in a set must reference all the others, including itself; missing return tags are the most common hreflang error

Hreflang matters for any store selling across countries or languages, where sending buyers to the wrong-currency or wrong-language page hurts conversion and can dilute rankings. It’s typically implemented in the page <head>, an XML sitemap, or HTTP headers. On Magento (Adobe Commerce), multi-store and multi-language setups generate these variants, and getting hreflang right — complete, reciprocal, correctly coded — is a core part of international technical SEO.