Hreflang and Multilingual SEO Basics

SEO Basics2 min readBy the Monopage team

If your website exists in more than one language or for more than one region, search engines need help to show the right version to the right visitor. The hreflang annotation does that. It tells Google that a set of pages are alternates of each other.

What hreflang does

Suppose you have an English page and a French page covering the same thing. With hreflang, you tell Google these are equivalent versions, so a French speaker is more likely to see the French page. It does not boost rankings by itself. It helps the right version appear and reduces the chance of near-identical pages competing.

Language and region codes

Values combine a language code and, optionally, a region code:

  • en for English in general
  • en-gb for English for the United Kingdom
  • fr-ca for French for Canada
  • x-default for a fallback page, such as a language selector

Use real, valid codes. Use region codes only when the content actually differs by region, such as currency or spelling.

Where to put it

Three methods are accepted:

  1. In the page head using link tags
  2. In HTTP headers, useful for non-HTML files
  3. In the XML sitemap

Pick one method and keep it tidy. For small sites the head tags are usually simplest. See what is a sitemap.xml.

Example in the head

Each page lists all its versions, including itself:

<link rel="alternate" hreflang="en" href="https://example.com/en/page/">

<link rel="alternate" hreflang="fr" href="https://example.com/fr/page/">

<link rel="alternate" hreflang="x-default" href="https://example.com/">

Rules to follow

  • Be reciprocal. If page A lists page B, page B must list page A. Missing return links cause the annotation to be ignored.
  • Use full URLs including the https and domain.
  • Self-reference. Each page includes itself in the list.
  • Match canonicals. Each version should have a canonical pointing to itself, not to another language. See canonical tags explained.
  • Link to live pages that return a normal status.

Common mistakes

  • Wrong codes, such as uk for the United Kingdom (the correct region code is gb)
  • Mixing up language and country
  • Pointing hreflang at redirects or error pages
  • Machine-translated pages left in poor quality

Translate well

Hreflang cannot fix weak translations. Poor text harms trust. See how to plan a multilingual website.

Check your work

Search Console and various third-party tools can flag errors. Review after major changes.

Not every site needs it

If you have one language and one audience, you can skip it.

Another technical topic that often affects modern sites is JavaScript SEO basics.