Hreflang

■ QUICK DEFINITIONHreflang is an HTML attribute that tells Google which language or regional version of a page to show to which users, for example English for the UK and English for India.
By Mandeep Singh ChahalLast updated:
01 · Overview

What is hreflang?

Google's localized versions guide says to "use hreflang to tell Google about the variations of your content." You can add it in HTML link tags, HTTP headers or the XML sitemap, and Google says the three methods are equivalent.

Each language version must list itself and all the others, and the links have to go both ways. Google says that if two pages do not both point to each other, the tags will be ignored. The x-default value marks the page to use when no listed language matches.

02 · Impact

Why hreflang matters for international SEO

  • Right page, right country: A UK shopper sees prices in pounds and an Indian shopper sees rupees.
  • Less duplicate confusion: Near-identical English pages for different regions are understood as alternates.
  • Better conversions: People who land on their own language and currency are more likely to buy or enquire.
03 · Playbook

How to set up hreflang

  1. Map your versionsList every language and region version of each page in a spreadsheet.
  2. Use the right codesUse ISO 639-1 language codes and, if needed, ISO 3166-1 Alpha 2 region codes, such as en-GB or hi-IN.
  3. Add return linksEach page lists itself and every alternate. Every alternate links back.
  4. Add x-defaultPoint x-default at a language picker or your main version.
  5. Check canonicalsEach version should have a self-referencing canonical tag, not point to another region.
04 · Example

An example of hreflang

Picture a software company with /en-us/, /en-gb/ and /en-in/ pricing pages that look almost the same. Without hreflang, Google keeps showing the US page in India. After adding hreflang with return links and x-default, Indian searchers start landing on the rupee pricing page.
05 · Pitfalls

Common hreflang mistakes

  • Missing return links: If page A lists page B but B does not list A, Google ignores the pair.
  • Wrong codes: "en-UK" is wrong. The region code for the United Kingdom is GB, so use en-GB.
  • Canonical to another region: Pointing every region's canonical to the US page tells Google to drop the others.
  • Using hreflang for language detection: Google says it does not use hreflang to detect a page's language. The content still has to be in that language.
06 · Expert tip

Expert tip from Mandeep Singh Chahal

Mandeep Singh Chahal
Digital marketing expert

Put hreflang in the XML sitemap when you have more than a handful of versions. It is much easier to keep correct in one file than across thousands of page templates.

07 · FAQs

Frequently asked questions

Does hreflang help rankings?
It does not boost rankings. It helps Google show the right version of a page to the right audience.
Is hreflang needed for one language site?
No. Hreflang is for sites with more than one language or regional version of the same content.
What is x-default in hreflang?
It tells Google which page to show when no listed language or region matches the user, often a language picker.
Where should I add hreflang tags?
In the page head, HTTP headers or the XML sitemap. Google treats the three methods the same.
What happens if hreflang return links are missing?
Google ignores the hreflang pair when the two pages do not both point to each other.
Can I use hreflang and canonical tags together?
Yes. Give each language version a self-referencing canonical and list the other versions with hreflang.
Get a FREE Audit WhatsApp