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.
