What is hreflang?

Crawvix Editorial Team · Published November 1, 2026 · Last updated November 1, 2026 · 2 min read

Hreflang is an annotation that tells Google which language or regional version of a page to show to which searchers. When you have the same page in English for the United States and the United Kingdom, or in English and French, hreflang links those versions together so the right one reaches the right person.

Why it matters

Without hreflang, a search engine may show a visitor a version in the wrong language or for the wrong country. It helps Google serve the intended version. Google describes it as a signal for choosing between alternates of a page, not as a way to raise rankings.

How to add it

  1. List every version of the page, in each language or region you serve.
  2. Choose a language code, and optionally a region. Languages use ISO 639-1 codes such as en and fr, and regions use ISO 3166-1 alpha-2 codes such as GB and US. Write them as en-GB.
  3. Add a link element for every version to the head of each version, including the page itself:
<link rel="alternate" hreflang="en-US" href="https://www.example.com/us/">
<link rel="alternate" hreflang="en-GB" href="https://www.example.com/uk/">
<link rel="alternate" hreflang="fr" href="https://www.example.com/fr/">
<link rel="alternate" hreflang="x-default" href="https://www.example.com/">
  1. Use full addresses, and the same set of links on every version. Each page must point back to the others, because annotations that are not returned may be ignored.
  2. Add x-default for the page you want shown when no listed language fits, such as a language selector.
  3. Test several pages, then watch Search Console for problems. Hreflang can also be placed in HTTP headers or in an XML sitemap, which suits sites with many versions.

Use the version of each address that you have chosen as the canonical. Pointing hreflang at a redirecting or noindex page weakens the setup.

Common mistakes

  • Missing return links between versions.
  • Using a country as a language, or a code that does not exist, such as en-uk rather than en-GB.
  • Pointing at addresses that redirect, return errors or are blocked.
  • Using hreflang for pages that are not real translations or regional variants.
  • Mixing methods (HTML, headers, sitemap) so that they disagree.

Crawvix's scan checks that hreflang is valid when used.

Frequently asked questions

Do I need hreflang for a one-language site?

No. It only matters when you publish alternate versions for different languages or regions.

Does hreflang translate my pages?

No. It only links versions that you already have.

Does every search engine use hreflang?

Google documents it. Other search engines may rely on other signals, so check each one's own guidance.

To see how your own markup checks out, Try the free website sample.

In this category

All 100 Quick answers guides