Skip to content
LingravelixMultilingual websites, planned properly

Tool

Hreflang planner

Enter each language version of one page with its address, and the planner writes the full hreflang set to place on every version, plus the same set as sitemap entries. It checks the codes against your browser's language and region data, flags duplicates, UK instead of GB, and regional versions without a language-only fallback. Everything runs in your browser.

Build the hreflang set

The planner needs JavaScript to build the tags. With it switched off, the steps further down this page describe each rule it applies, so you can write the set by hand.

Versions of one page

One row per language or language-and-region version. Use the full address of that version, starting with https://.

Fallback for everyone else

This can be a language chooser page, or the version to offer when none of the listed languages matches.

    Link elements for the head of every version

    Add your versions and choose Build the tags.

    The same set as sitemap entries

    
    

    How to use it

    1. Enter one row for each version of the page: a two-letter language code, an optional two-letter region, and the full address of that version. The planner starts with a German, French, Italian and English example you can overwrite.
    2. Add an x-default address if you have a language chooser page or a version to offer when nothing else matches.
    3. Choose Build the tags. Read any messages above the results first; red ones must be fixed before the set is usable.
    4. Copy the link elements into the head of every version listed, or use the sitemap form instead. Do not use both for the same pages.
    5. Save the result as a text file if you want to send it to a developer.

    What it checks

    Checks the planner runs
    CheckWhy
    Language is two letters and recognisedGoogle expects ISO 639-1 language codes 1
    Region, if given, is a recognised two-letter codeGoogle expects ISO 3166-1 alpha-2 regions 1
    UK is rejected in favour of GBUK is not an ISO 3166-1 code; GB is the code for the United Kingdom
    Groupings such as EU are rejectedThey are not countries, so they are not ISO 3166-1 alpha-2 regions
    Each address is complete and uses httpsAnnotations should use full addresses; the planner accepts only https://
    No code appears twiceOne code can point to one address only
    Shared addresses are flaggedAllowed, but worth checking that one page suits both audiences
    Regional versions have a general fallbackA reader of that language elsewhere matches nothing otherwise
    At least two versions existHreflang describes alternatives

    Recognition uses the language and region names built into your browser. If your browser lacks that data, the planner falls back to checking the format only.

    What it does not check

    The planner works only with what you type. It does not visit your pages, so it cannot tell whether the annotations are actually published, whether every version carries the same set, whether the addresses answer without redirects, or whether canonical tags point at the right page. Those checks need the live site; our hreflang guide explains how to do them by hand.

    Why the set is identical on every version

    Google's documentation requires every version to name itself and all its siblings, and it disregards a pair whose pages fail to reference each other 1. That is why the planner produces one block for all versions instead of a different block per page: the same lines go everywhere, including the line for the page itself.

    Reading the sitemap output

    The sitemap form repeats the full set inside each version's url entry. The urlset element at the top of your sitemap must declare the XHTML namespace, which the first comment line of the output reminds you about. If your platform generates sitemaps automatically, check whether it can add these entries before writing them by hand.

    Swiss examples

    For a site with German, French and Italian versions aimed at Switzerland and an English version for everyone, the codes would be de-CH, fr-CH, it-CH and en. If your German version serves German readers everywhere, plain de is simpler and follows the W3C advice to keep tags as short as the context allows 2. Romansh uses rm.

    Privacy

    Nothing you enter leaves your browser. The page makes no requests with your data and stores nothing after you close it.

    Sources

    1. Localized versions of a page (hreflang) Google Search Central, primary source
    2. Which language tag is right for me? W3C Internationalization Activity, primary source

    Want the published tags on your live site looked at?

    Send us the address and the languages, and we'll reply by email on whether we can help.

    Ask about your site