Set up hreflang for multilingual and multi-regional sites
Tell search engines which language or regional version of a page to show, with valid codes, self-references and reciprocal links.
The problem
hreflang annotations use invalid codes, or a page does not include an entry for itself.
How to spot it
- Visitors land on the wrong language version from search.
- The audit lists pages with invalid codes or missing self-references.
Why it matters
hreflang helps search engines show the right version to each audience. Mistakes are common, and incorrect annotations are typically ignored.
What happens if you leave it
Visitors see a language they cannot read and leave.
How to fix it
-
For each page, list every language or region version of it, including itself:
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/pricing/"> <link rel="alternate" hreflang="bn-bd" href="https://example.com/bd/pricing/"> <link rel="alternate" hreflang="x-default" href="https://example.com/pricing/"> -
Use ISO 639-1 language codes, optionally followed by an ISO 3166-1 region code (
en,en-gb,bn-bd).ukis Ukrainian, not the United Kingdom; useen-gb. -
Make the annotations reciprocal: if page A lists B, page B must list A.
-
Use absolute, canonical, live URLs.
-
Add
x-defaultfor a language picker or fallback page.
Common mistakes
- Pointing hreflang at redirected or noindex URLs.
- Using country codes alone (
hreflang="bd"). - Different canonical and hreflang targets.
How to check the fix worked
View the source of each language version and confirm that all versions list each other and themselves. Re-run the audit to confirm.
References and further reading
Related tutorials
Create and check your robots.txt file
robots.txt tells crawlers which parts of your site they may fetch and where your sitemap is. Here is how to pu...
Build an XML sitemap that only lists the right pages
A clean sitemap lists every page you want found: live, final and indexable. This guide covers creating one, ke...
Fix broken links and pages that return errors
Find and repair links to missing pages, restore or redirect dead URLs, and deal with server errors and unreach...