SEO

Hreflang Generator

Create hreflang annotations for multilingual and international websites – as HTML tags, HTTP headers or an XML sitemap. The tool checks every code and detects typical mistakes such as “en-UK”, country codes instead of language codes or a missing x-default.

  • Runs entirely in your browser
  • No data upload
  • No sign-up
  • Free

Language versions

Fill URLs from a pattern

Placeholders: {lang} = full code (en-us), {language} = language only (en), {region} = country only (us). For x-default, the placeholder is left empty.

Check

    Output

    Insert into the <head> of every listed page.

    
            

    Check existing hreflang annotations

    Paste the source code of a page, the <link> tags, a Link header or a sitemap excerpt. It is only evaluated in your browser.

    Guide

    How it works

    1. Enter language versions

      For each language or region, enter a code (e.g. en, en-GB, de) and the complete URL of the respective page. The field suggests common codes and shows the name of the language.

    2. Set x-default

      With x-default you define the page for everyone whose language is not included – often the English version or a language selector.

    3. Mind the notes

      The tool detects wrong codes and suggests the correct notation. Under “Check” you find duplicates, missing general language versions and more.

    4. Implement

      Insert the HTML block into every listed page – identical on all of them. Alternatively, provide the annotations via the XML sitemap or as an HTTP header (e.g. for PDFs).

    FAQ

    Frequently asked questions

    What is hreflang needed for?

    hreflang tells Google which pages are translations or country variants of each other. This way, users in the UK get the British version and users in Australia the Australian one – and the pages are not considered duplicate content.

    How is an hreflang code structured?

    First the language according to ISO 639-1 (en, de, fr), optionally followed by a country according to ISO 3166-1 (US, GB, AU). A country alone does not work: “us” is not a valid code, en-US is correct. And the United Kingdom is GB, not UK.

    What is x-default?

    The fallback page for everyone for whom there is no matching language version. Typically an English page or a page with a language selector. x-default is optional but recommended.

    Does every page have to reference itself?

    Yes. The hreflang block must be on all pages involved – and every page must list itself as well. If these return links are missing, Google ignores the annotations completely or partially.

    HTML, header or sitemap – which is better?

    All three are equivalent; choose one method and stick with it. HTML tags are the simplest, the sitemap is clearer with many languages, and the HTTP header is the only option for files such as PDFs.

    Are my addresses visited?

    No. The tool only checks the notation in your browser – it does not visit any of the entered pages.