SEO

Hreflang

Also called hreflang tag, rel=alternate hreflang, x-default

An HTML attribute that tells search engines which language and country each version of a page is for, so searchers see the right one.

Quick facts: Hreflang

Category
SEO
Also called
hreflang tag, rel=alternate hreflang, x-default
Level
Advanced
Affects
Which country or language version Google shows, duplicate handling between similar pages, currency and delivery information searchers see
Where to see it
SEO crawlers with hreflang checks, page source, XML sitemaps, multilingual plugins, Google Search Console
In this article4
  1. How hreflang works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

Hreflang is an HTML attribute that tells search engines which language, and optionally which country, each version of a page is written for, so they can show the right version to the right searcher. A UK business with a separate site for Ireland, for example, uses hreflang to point Google at its en-GB pages for British searchers and its en-IE pages for searchers in Ireland.

How hreflang works

Each version of a page lists every version in the set, including itself. On the UK homepage of a retailer that also sells into Ireland, the head of the page would carry two link elements: one marked hreflang="en-GB" pointing at the UK URL, and one marked hreflang="en-IE" pointing at the Irish URL. The Irish homepage carries the same pair. That return link matters. If page A names page B but B does not name A, Google may ignore the pairing.

The value is a language code, optionally followed by a region code. The language part uses ISO 639-1 (en for English, cy for Welsh, ga for Irish) and the region part uses ISO 3166-1 alpha-2. That second part catches many British sites out, because the code for the United Kingdom is GB, not UK. A tag reading “en-UK” is invalid and is ignored.

A special value, x-default, marks the page to show anyone who matches none of the listed versions, often a country selector. Hreflang can sit in the HTML head, in HTTP headers (handy for PDFs), or in the XML sitemap. Pick one method for a set of pages; mixing them makes errors far harder to trace.

Why it matters

Without it, English-language versions for different countries look almost identical to Google. A UK shop that opens an Irish site with euro prices and Irish delivery terms can find Google showing Irish customers the sterling page, or treating the two as duplicate content and picking one to show for both. Customers then land on the wrong currency, the wrong delivery times and the wrong VAT details, and many leave.

Hreflang is a signal, not a rule. Google normally follows it when it is set up correctly, but it will not stop a page appearing in the “wrong” country if Google thinks that page is the better answer. It also does nothing for a business with one site and one market. A London accountant serving UK clients does not need it at all, and adding it only creates something else to maintain.

Common mistakes

  • Writing “en-UK” instead of “en-GB”.
  • Missing return links, so the versions never confirm each other.
  • Pointing hreflang at URLs that redirect, return a 404 or carry a noindex tag.
  • Setting the canonical tag on the Irish pages to the UK versions. That tells Google the Irish pages are duplicates to drop, which contradicts the hreflang.
  • Pointing every Irish product page at the UK homepage instead of at its true equivalent.
  • Adding hreflang to a site with only one language and one market, where it does nothing.

How to act on it

First decide whether you need it. If you run, or plan to run, separate versions of pages for different countries or languages (a UK and an Irish shop, or English and Welsh versions of the same service pages) then yes. Settle your international SEO structure first, whether that is a country-code domain such as .ie, a subfolder such as /ie/, or a subdomain, because hreflang describes that structure rather than replacing it.

Then map each page to its equivalents in a spreadsheet, generate the tags from that map (most ecommerce platforms and multilingual plugins can do this), and crawl the site to confirm every tag has a return link, resolves to a working page and uses valid codes. Google retired the international targeting report in Search Console in 2022, so a crawler is now the practical way to audit it. Setting up and checking hreflang sits within my technical SEO work.

Do and do not

Do

  • Use en-GB, not en-UK, for the United Kingdom
  • Make every version list every other version and itself
  • Point each tag at a live, indexable 200 page

Do not

  • Canonicalise one country version to another
  • Add hreflang to a single-market, single-language site
  • Mix HTML, header and sitemap methods for the same pages

Questions people ask about this

Do I need hreflang if my site is only for UK customers?

No. Hreflang only helps when you have more than one version of a page for different languages or countries. A single English site aimed at the UK gains nothing from it. Make sure your prices, address and phone number clearly signal the UK instead.

What is x-default?

x-default names the page to show searchers whose language or location matches none of your listed versions. It is often a country or language selector, or the version you treat as the main one. It is optional, but useful once you serve several markets.

Can hreflang fix a page ranking in the wrong country?

It helps Google swap in the right version when it shows your site, but it does not force rankings. If the Irish page is thin, unfinished or slow, Google may still prefer the UK page. Make each version a complete page with local prices, delivery terms and contact details, then use hreflang to connect them.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.