If your website serves people in more than one country or language, international SEO decides whether each audience sees the right version of your pages: UK visitors see pounds rather than dollars, French speakers see French rather than English. The main tool for this is hreflang, a set of annotations that tell Google which page is the equivalent in each language or region. This guide explains when you need it, how to set it up, which URL structure to choose, and the mistakes that make Google ignore it.

Do You Need International SEO?

You probably do if:

  • your site has the same content in more than one language;
  • you sell to several countries with different prices, currencies, delivery terms or legal information;
  • you run separate country domains such as example.co.uk and example.fr.

A site in one language aimed at one country does not need hreflang. Google's guide to managing multi-regional and multilingual sites is the primary reference for everything below.

How Hreflang Works

Each page lists all of its language or regional versions, including itself. For a page available in UK English, US English and French, every one of the three versions carries the same set of annotations:

<link rel="alternate" hreflang="en-gb" href="https://www.example.com/uk/pricing/">
<link rel="alternate" hreflang="en-us" href="https://www.example.com/us/pricing/">
<link rel="alternate" hreflang="fr" href="https://www.example.com/fr/tarifs/">
<link rel="alternate" hreflang="x-default" href="https://www.example.com/pricing/">
  • The code is a language (ISO 639-1, such as en or fr), optionally followed by a region (ISO 3166-1 alpha-2, such as gb or us). A region on its own is not valid.
  • x-default names the page to show when no listed version matches the searcher, often a language selector or your main international page.
  • URLs must be absolute and point to the final, indexable version of each page.

Three Ways to Add Hreflang

Google's localized versions documentation describes three equivalent methods. Use one per page, not a mix:

Method Best for
HTML <link> tags in the headMost CMS-based sites with a few language versions
HTTP Link headersNon-HTML files such as PDFs
XML sitemap entriesLarge sites, or sites where editing page templates is difficult

Language vs Country Targeting

Use language-only codes (fr) when one version serves all speakers of that language. Use language plus region (fr-fr, fr-be, fr-ca) only when the content really differs between those countries, for example in prices, delivery, regulations or spelling. Creating near-identical regional copies without real differences adds maintenance without benefit.

Choosing a URL Structure

Structure Example Pros Cons
Country domainsexample.deClear country signal for users and search enginesSeparate sites to run, buy and promote
Subdirectoriesexample.com/de/One site, easy to manage, shared hosting and authorityCountry signal relies on hreflang and content
Subdomainsde.example.comCan be hosted separatelyMore setup than subdirectories
URL parametersexample.com?lang=deSimple to buildNot recommended by Google

For most small and medium businesses, subdirectories are the simplest choice. Whatever you choose, avoid redirecting visitors automatically based on their IP address or browser language: Google mainly crawls from the US, and automatic redirects can stop it from seeing your other versions. Offer a clear language or country switcher instead.

Common Hreflang Mistakes

  • Missing return links. Google's documentation is explicit: if two pages don't both point to each other, the tags are ignored. Every version must list every other version.
  • Pointing to redirected, noindexed or 404 URLs. Each URL must be the live, canonical page.
  • Conflicting canonicals. Each language version should have a self-referencing canonical. Canonicalising all versions to the English page tells Google the translations are duplicates.
  • Invalid codes, such as en-uk (the correct region code is gb) or a region without a language.
  • Untranslated pages. Hreflang does not help if the "French" page is mostly English.

How to Check Your Setup

  1. View the source of each language version and confirm the annotations match exactly.
  2. Use Search Console's URL Inspection to confirm Google indexes each version under its own URL.
  3. Filter the Performance report by country to see whether the right version is shown in each market.
  4. Run each version through our broken link checker to catch hreflang targets that redirect or return 404.

For the wider strategy of entering new markets, read our guide to SEO for multiple countries, and for how canonicals interact with hreflang, see canonical URLs explained.