Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    How to Use hreflang Tags for a Multilingual Website

    Updated November 2026

    Written by the Toolpuffin team. Tools in this guide are tested in the browser.

    If your site exists in more than one language, hreflang tags tell search engines which version belongs to which visitor. They are easy to get wrong. This guide explains the rules and how to generate the tags.

    Try the tool: Hreflang Tag Generator

    What hreflang does

    Hreflang is an annotation that links the versions of a page in different languages or for different countries. Search engines can then show the Dutch version to Dutch visitors and the English version to English visitors.

    Source: Google Search Central: localized versions of your pages

    The rules that matter

    • Every version must list all versions, including itself.
    • The versions must point to each other. If page A points to B, B must point back to A.
    • Use full addresses, including https.
    • Use an ISO 639-1 language code such as nl or en, optionally followed by a country, such as nl-BE or en-GB.
    • An x-default version can be given for visitors whose language you do not cover, such as a language picker or your main page.

    A small example

    VersionTag
    Dutch<link rel="alternate" hreflang="nl" href="https://example.com/nl/" />
    English<link rel="alternate" hreflang="en" href="https://example.com/" />
    Default<link rel="alternate" hreflang="x-default" href="https://example.com/" />

    Put the full set in the head of every version. You can also give the same information in an XML sitemap or as an HTTP header, which helps for files such as PDFs.

    Generate the tags

    1. Type one line per language: the code, then the address.
    2. Choose an x-default and the output format: HTML tags, sitemap entries or an HTTP header.
    3. Copy the code into every language version of the page.

    The tool warns about wrong language codes, double entries and addresses without https. It does not open your pages, so check that every address works.

    Common mistakes

    • A version that does not point back, so the tags are ignored.
    • Codes such as en-UK. The country code for the United Kingdom is GB.
    • Pointing to a page that redirects or does not exist.
    • Mixing a canonical tag that points to another language version with hreflang. Let each version be its own canonical.

    More guides