Hreflang
Hreflang annotations tell search engines which language and regional version of a page to show to which users. They swap the right URL into results but do not, on their own, improve rankings.
  • Hreflang must be reciprocal. If page A references page B, page B must reference page A.
  • Every page lists every alternate, including itself.
  • Use ISO 639-1 language codes and ISO 3166-1 Alpha 2 region codes. It is en-GB, not en-UK.
  • Hreflang URLs must be canonical, indexable and return 200.
  • Add x-default for users who match none of your versions.

Hreflang is an annotation that links together the language and country versions of a page. When someone in France searches, it helps Google show them the fr-FR page instead of the en-GB one. It is a signal that swaps URLs in results. It is not a ranking boost, and it does not replace proper localisation.

When you need it

  • The same content translated into different languages.
  • The same language targeted at different countries, such as English for the UK, US and Australia with different prices or spellings.
  • A mix of both.

If you have one site in one language for one market, you do not need hreflang.

Syntax

In the HTML head:

 <link rel="alternate" hreflang="en-GB" href="https://www.example.com/uk/" />
<link rel="alternate" hreflang="en-US" href="https://www.example.com/us/" />
<link rel="alternate" hreflang="fr" href="https://www.example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/" /> 

The value is a language code, optionally followed by a region code. Language alone is valid (fr). Region alone is not. Some frequent slips: the UK is GB, not UK. There is no "eu" region and no "la" for Latin America (es-419 is the correct code for Latin American Spanish). Chinese is best expressed with scripts, zh-Hans and zh-Hant.

Three ways to implement

  • HTML link elements in the head. Simple, but adds weight to every page when you have many locales.
  • XML sitemap using xhtml:link entries. Easier to manage at scale and keeps the markup out of the page.
  • HTTP headers for non-HTML files such as PDFs.

Pick one method. Using several invites contradictions.

The rules that break most implementations

  • Return links. Every page in a set must list all the others. Without reciprocity the annotations are ignored.
  • Self-reference. Each page includes itself in the set.
  • Canonical alignment. Each version canonicalises to itself. If the French page canonicalises to the English page, hreflang cannot work.
  • Indexable targets. No redirects, 404s, noindex or robots.txt blocks.
  • Absolute URLs with protocol and hostname.

x-default

The x-default value names the fallback page for users who match none of your specified languages or regions. It usually points to a global English version or a country selector.

Things hreflang does not do

  • It does not fix duplicate content between same-language versions. Google may still fold near-identical en-GB and en-US pages together and show one URL with the other's title. Meaningful localisation helps.
  • It does not geotarget. Signals such as ccTLDs, local links, currency, addresses and content do that.
  • Bing largely ignores it and relies on the content-language meta tag and other signals.

Do not auto-redirect by IP

Forcing users to a locale based on IP address also forces Googlebot, which crawls mostly from the US, onto the American version. It may never see the others. Show a banner suggesting the better version instead, and let people choose.

Common mistakes

  • Missing return tags.
  • Invalid codes such as en-UK or es-LA.
  • Hreflang pointing at redirected or parameterised URLs.
  • Annotations only on the homepage.
  • Mixing URL formats between the tags and the canonical.
  • Translating the page but leaving titles, structured data and internal links in the original language.

How to test

Google removed the International Targeting report from Search Console, so testing is now down to third-party tools. Crawl with hreflang validation enabled to catch missing return links, bad codes and non-indexable targets, and spot-check which URL ranks in each market using Search Console's country filter.

The GEO angle

AI assistants do not reliably honour hreflang. They tend to answer in the user's language while citing whichever version they retrieved, often the English one. Strong on-page localisation, clear language declarations and locale-specific internal linking do more for AI visibility in each market than the annotations alone.

Add your title here

This is a paragraph. Writing in paragraphs lets visitors find what they are looking for quickly and easily. Make sure the title suits the content of this text.

Contact Us Amy Time