Skip to main content

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
At a glanceSEO glossary
  • 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
  1. Quick definition
  2. Why it matters
  3. How it works
  4. How to check it
  5. Common mistakes
  6. Related concepts
  7. Check it on your site
  8. Sources and review

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/">
The same set goes on every one of these pages, including a reference to itself.
  • 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-default names 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

  1. Check every page in a set lists the same alternates, including itself.
  2. Validate codes: en-uk is wrong (the country code is gb), ke alone is wrong.
  3. Confirm that alternates are not redirected, noindexed or canonicalised to another URL.
  4. 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

In the NdovuSEOLabs platform

Run the same checks on every page of your site, with your own data.

Sources and review

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.