Hreflang Tag Generator

hreflang link tags, sitemap entries and headers, validated

Language versions of one page

    

    Hreflang Tag Generator: hreflang link tags, sitemap entries and headers, validated. Input: Values you enter. Output: Results shown on the page and text to copy. Privacy: Runs in your browser: inputs and files stay on your device and are not uploaded.

    How to generate hreflang tags

    1. Add one row per language or country version of the page: the hreflang code (such as en, en-GB, de or pt-BR) and the full URL of that version.
    2. Keep x-default on and point it at your language selector or the version for everyone else.
    3. Choose the output: <link> tags for the page head, entries for an XML sitemap, or an HTTP Link header for PDFs and other non-HTML files.
    4. Fix any warnings, then add the same complete set to every language version.

    How hreflang works

    hreflang tells Google and Yandex which language or regional version of a page to show to each user, so a searcher in Germany sees your German page and one in Mexico sees the Latin American Spanish page. It also stops near-identical versions (for example US and UK English) from competing with each other as duplicates.

    The rules are strict, and mistakes are common:

    The validator catches invalid codes and suggests fixes, such as en_us to en-US. Everything runs in your browser.

    What is x-default?

    The fallback for users whose language or region you do not target, often a language selection page or your international English version.

    Do I need hreflang for a single-language site?

    No. hreflang is only needed when the same content exists in several languages or regional variants.

    Does Bing support hreflang?

    Bing mainly uses the content-language meta tag and HTML lang attribute instead. Set lang on each page's <html> element as well.

    Made by BufferMint. We also design and build software products for founders. See our services →

    Runs in your browser. Your files are not uploaded. We count anonymous visits, without cookies.