INTERNATIONAL & MULTILINGUAL SEO
Hreflang: what it means and how it works
Annotations that connect language and country versions of the same page.
- Advanced level
- 1 primary source
- Reviewed 29 October 2026
- TopicInternational & multilingual SEOAlso in Technical SEO
- LevelAdvancedFor technical SEOs and developers
- Also calledrel=alternate hreflang
- Sources1 primary sourceGoogle Search Central
- Reviewed29 October 2026Re-checked every 12 months
On this page
Quick definition
Hreflang is an annotation that tells search engines which language or regional versions of a page are equivalent, so each searcher can be shown the version meant for them. It is set with link elements, HTTP headers or the XML sitemap, and it only works when every version links back to the others.
Why it matters
A business selling in Kenya, Tanzania and Uganda may have English and Swahili pages, and country pages with different prices and currencies. Without hreflang, search engines may show a Kenyan searcher the Tanzanian page, or treat near-identical English country pages as duplicates.
How it works
<link rel="alternate" hreflang="en-ke" href="https://www.example.com/ke/">
<link rel="alternate" hreflang="en-tz" href="https://www.example.com/tz/">
<link rel="alternate" hreflang="sw" href="https://www.example.com/sw/">
<link rel="alternate" hreflang="x-default" href="https://www.example.com/">- Values are an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region:
sw,en-ke. A region alone is invalid. - Annotations must be reciprocal: if page A lists B, B must list A, or the pair may be ignored.
x-defaultnames the page for searchers who match none of the listed versions, such as a language selector.- Each URL in the set should be indexable and its own canonical.
How to check it
- Check every page in a set lists the same alternates, including itself.
- Validate codes:
en-ukis wrong (the country code isgb),kealone is wrong. - Confirm that alternates are not redirected, noindexed or canonicalised to another URL.
- Compare what each market sees in search with Search Console filtered by country.
Common mistakes and misconceptions
Myth Hreflang is a ranking boost.
In fact It helps search engines swap in the right version of a page that already ranks. It does not make the page rank higher.
Myth The HTML lang attribute does the same job for Google.
In fact Google does not use the lang attribute or language meta tags to pick versions; it uses hreflang and its own language detection.
Check it on your site
Free tools, no sign-up
- FreeHreflang ValidatorValidate a page’s hreflang tags: language and country codes, self reference, duplicates, x-default and return links from each alternate.Open the tool
- FreeHreflang Tag GeneratorTurn a table of page versions by language into reciprocal hreflang link tags or an XML sitemap with xhtml:link entries.Open the tool
In the NdovuSEOLabs platform
Run the same checks on every page of your site, with your own data.
Sources and review
- Tell Google about localized versions of your page Google Search Central
Written and maintained by Ndovu SEO Labs. First published 29 October 2026. Facts last checked against the sources above on 29 October 2026. How we write and review the glossary.