Free SEO extension ๐Ÿ”ฅ
International SEO โ€ข SeoSpidie Editorial Team โ€ข โ€ข 18 views

How to Use Hreflang Tags for International SEO (Without Mistakes)

Show the right language or country version of your page to each searcher, with hreflang tags set up correctly.

Site audit illustration

If your website has versions for different languages or countries โ€” English for the US and UK, Spanish for Spain and Mexico, French for Canada โ€” hreflang tags tell search engines which version to show to which searcher. Without them, a shopper in London may land on your US page with dollar prices, or a Spanish speaker may see the English page.

What hreflang does (and does not do)

Hreflang is an annotation that says "this page has equivalent versions in these languages or regions". Google uses it to choose the best version for each searcher. It does not boost rankings, and it does not stop duplicate-content concerns on its own โ€” it simply helps the right page appear in each market. Bing relies more on the page's content-language signals and the html lang attribute, so set those correctly too.

The codes

  • Language only: en, es, fr, de โ€” use when one version serves all speakers of that language.
  • Language + region: en-gb, en-us, en-au, fr-ca, es-mx โ€” use when versions differ by country, for example in prices, spelling or delivery.
  • x-default: the fallback page for everyone else, often a language selector or your main international page.

Language codes use ISO 639-1 and region codes use ISO 3166-1 Alpha-2. A common error is using en-uk โ€” the correct region code for the United Kingdom is gb.

Three ways to add hreflang

  1. Link tags in the page head โ€” one link rel="alternate" hreflang="โ€ฆ" line per version, on every version.
  2. HTTP headers โ€” useful for PDFs and other non-HTML files.
  3. XML sitemap โ€” listing alternates for each URL. Easier to manage for large sites.

Use one method consistently rather than mixing them.

The rules that matter most

  • Return links: if the UK page points to the US page, the US page must point back to the UK page. Missing return links cause Google to ignore the pair.
  • Self-reference: each page lists itself as well as its alternates.
  • Canonical URLs only: point hreflang at indexable, canonical pages โ€” never at redirects or noindexed URLs. Read what a canonical tag is.
  • Each version canonicalises to itself, not to the main-language page.
  • Truly equivalent content: link pages that serve the same purpose in each market.

A worked example

An online course company sold in the US, UK and Australia from one English site, with prices in dollars only. UK searchers kept landing on US pricing pages and leaving. The company created regional pricing pages at /us/, /uk/ and /au/ with local currency and spelling, added hreflang tags for en-us, en-gb and en-au plus an x-default, and confirmed every page linked back to the others. Within weeks Search Console showed UK queries leading to the UK page instead.

How to check your setup

Run your main language versions through the free site audit report to confirm they are indexable, have the right canonical and return a normal status. Then spot-check the page source for matching hreflang sets on each version. Sitemaps can also carry hreflang โ€” see what an XML sitemap is.

More free tools: browse all our free SEO tools, no sign-up needed.

Frequently asked questions

Do I need hreflang for a single-language website?

No. Hreflang is only needed when you have equivalent pages in different languages or for different regions.

Is hreflang a ranking factor?

No. It helps search engines show the most suitable version, which can improve clicks and conversions in each market.

What is x-default used for?

It names the page shown when no listed language or region matches the searcher, such as a country selector.

Can hreflang point to another domain?

Yes. Versions can sit on different domains, such as example.co.uk and example.com, as long as the annotations are reciprocal.