Hreflang Tags: Showing Google the Right Language and Region
Hreflang tags tell search engines which language and regional version of a page to serve. Learn the syntax, setup, and common mistakes.
Hreflang tags are HTML attributes that tell search engines which language and geographic version of a page to show to a user.
What Hreflang Tags Do
For a site that offers the same content in several languages or regions, hreflang keeps users out of the wrong version and prevents those versions from competing in search.
The Syntax
You can declare hreflang in the page head, an HTTP header, or an XML sitemap. Each declaration points to the alternative URLs using language codes like en, es, or pt-br, plus a default version marked as x-default.
<link rel="alternate" hreflang="en-gb" href="https://example.com/" />
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
How to Implement Hreflang
- Make every language pair bidirectional: if page A links to page B, page B must link back.
- Include a self-referencing hreflang tag on every page.
- Add an
x-defaultversion for users whose language is not listed. - Only point to crawlable, indexable URLs.
Common Hreflang Mistakes
- One-way tags where the return link is missing.
- Return URLs that do not match the original declaration.
- Forgetting
x-defaultfor unspecified markets. - Using wrong or inconsistent language and region codes.
How to Verify Hreflang
The International Targeting report in Google Search Console shows how many pages are recognized per language and flags errors like missing return tags.
The setup: a store sells the same catalog to the UK and the US.
The problem: Google shows the .com page to UK shoppers by default.
The fix: add hreflang pairs pointing en-gb and en-us versions at each other.
The reading: UK users see the .co.uk version with local pricing and shipping.
Quick Tip
Hreflang does not replace canonical tags. A multilingual page should carry both, pointing to the same primary URL.
Frequently Asked Questions
Hreflang Tags, Bottom Line
Hreflang is the map that keeps international visitors on the right version of your site.
Get the pairs bidirectional, add x-default, and verify the setup in Search Console.