Topic 23 · International

Hreflang and regional variants

Hreflang annotations tell search engines which version to serve to which audience. If set up incorrectly, they are ignored: this topic checks reciprocity, codes and consistency with canonicals.

Priority
Critical
Applies to
Depends on your site: multilingual site
Practical guides
17 written out of 17
0/17 done

Free, no account: your progress is saved in this browser.

Download this topic (PDF) 4 pages · 93 KB

Where to start

Three checks with a strong effect, doable before the rest.

  1. 23.01 Implement hreflang for equivalent pages Intermediate · 2 h to 3 days
  2. 23.02 Check reciprocity Intermediate · 1 to 4 h
  3. 23.09 Check that targets return HTTP 200 Intermediate · 1 to 4 h

The 17 checks of this topic

Click a check to read its guide. Tick the box once it is verified on your site.

Who
Difficulty

1Implement hreflang

0/6 done
  1. 23.01
    Implement hreflang for equivalent pages

    Link each page to its translations and regional variants with hreflang (HTML, HTTP header or sitemap) on WordPress, Shopify, Drupal, Laravel or Next.js.

    Who: Developer

    Intermediate 2 h to 3 days
  2. 23.03
    Include the self-referencing annotation

    Make each page appear in its own hreflang list, with its exact canonical URL, and fix the templates, CMSs and sitemaps that leave it out.

    Who: Developer

    Easy 30 min to 2 h
  3. 23.04
    Use absolute URLs

    Write every hreflang URL in full, with https and the right domain, and fix the relative or http URLs produced behind a proxy or a CDN.

    Who: Developer System administrator

    Easy 30 min to 2 h
  4. 23.08
    Use x-default if relevant

    Decide when to add hreflang x-default, choose its target page and declare it in HTML, sitemap, WordPress, Shopify, Drupal, Laravel or Next.js.

    Who: Developer Marketing

    Intermediate 1 to 3 h
  5. 23.13
    Automate annotations through the CMS

    Have the CMS or framework generate hreflang annotations from translation links: WordPress, Shopify, PrestaShop, Drupal, Laravel, Next.js.

    Who: Developer

    Intermediate 2 h to 2 days
  6. 23.15
    Use HTTP headers for PDFs if needed

    Announce the language versions of your PDFs with the HTTP Link header on Apache, Nginx, IIS, Cloudflare, CloudFront, Netlify, Vercel or Laravel.

    Who: Developer System administrator

    Intermediate 1 to 3 h

2Validate language and country codes

0/3 done
  1. 23.05
    Validate ISO 639-1 language codes

    Check that every hreflang value starts with a valid ISO 639-1 language code (ja, not jp; sv, not se) and fix it where the CMS defines it.

    Who: Developer

    Easy 30 min to 2 h
  2. 23.06
    Validate ISO 3166-1 Alpha-2 country codes

    Check that every hreflang country code is an assigned ISO 3166-1 alpha-2 code (GB, CH, AT), placed after the language, and remove UK, EU or 419.

    Who: Developer Marketing

    Easy 30 min to 2 h
  3. 23.07
    Use en-GB rather than en-UK

    Replace en-UK with en-GB in your hreflang annotations, sitemaps and headers, on WordPress, Shopify, Drupal, Laravel or Next.js, and avoid reserved codes.

    Who: Developer Marketing

    Easy 30 min to 2 h

3Check the target URLs

0/5 done
  1. 23.09
    Check that targets return HTTP 200

    Check that every URL cited in your hreflang returns 200, find the cause of 3xx, 4xx and 5xx on the server, CDN or CMS, and fix the source of the annotations.

    Who: Developer System administrator

    Intermediate 1 to 4 h
  2. 23.10
    Check that targets are indexable

    Make every URL in your hreflang indexable: no noindex, no X-Robots-Tag, no robots.txt block, no canonical elsewhere, on the server, CMS or framework.

    Who: Developer System administrator

    Intermediate 1 to 3 h
  3. 23.11
    Exclude redirects and nonexistent pages

    Generate hreflang that lists only published translations, at their final URL: rules for WordPress, Shopify, Laravel, Next.js and sitemaps.

    Who: Developer

    Intermediate 2 h to 2 days
  4. 23.12
    Align hreflang and canonical

    Make canonical and hreflang match: a self-referencing canonical per language and identical URLs in the annotations, on WordPress, Shopify or Next.js.

    Who: Developer

    Intermediate 1 to 4 h
  5. 23.14
    Update annotations when a translation is removed

    When a translation is removed, take it out of the other versions' hreflang annotations, the sitemap and the cache, and handle its old URL.

    Who: Developer Writer

    Intermediate 30 min per case, 1 day to automate

4Check reciprocity and consistency

0/3 done
  1. 23.02
    Check reciprocity

    Check that every hreflang annotation is confirmed by the page it targets, with a free script or Screaming Frog, then fix the missing return links.

    Who: Developer

    Intermediate 1 to 4 h
  2. 23.16
    Check consistency across HTML, HTTP header and sitemap methods if combined

    If your hreflang annotations go through HTML, HTTP headers and the sitemap, check that they say the same thing, with a script or a crawl.

    Who: Developer

    Intermediate 1 to 3 h
  3. 23.17
    Test same-language variants for different countries

    Test your en-US, en-GB, fr-FR, fr-CA or fr-BE variants: differentiation, annotations, selected canonical, URL shown per country in Search Console.

    Who: Developer Marketing

    Intermediate 2 to 4 h, then 30 min per month