Home SEO Tools Hreflang Tag Generator
🌍
SEO

Hreflang Tag Generator

Generate hreflang tags for international and multilingual websites. Add language and region variants, auto-adds self-reference tag, x-default support, real-time validation for missing self-reference and reciprocal tags, HTML link and XML sitemap output.

🌍 HTML + XML sitemap output✅ Self-reference auto-added⚠ Reciprocal tag validation🔢 All ISO 639-1 languages
Switch tool: 📰 Article Schema Generator 🍞 Breadcrumb Schema Generator ❓ FAQ Schema Generator 🏢 Local Business Schema Generator ⭐ Review Schema Generator 🔧 Schema Markup Generator 🔍 Structured Data Testing Tool 📣 Open Graph Tag Generator 🐦 Twitter Card Generator 🌍 Hreflang Tag Generator 🤖 Robots.txt Generator 🔊 Speakable Schema Generator
Language variants
x-default
Output format
Generated Hreflang Tags

    
Language ↔ URL Relationship Table

📖How to Use the Hreflang Tag Generator

  1. 1
    Add your language and region variants

    Click Add Language to add each version of your page. Select the ISO 639-1 language code and optionally an ISO 3166-1 country code for regional targeting (e.g. en-GB, en-US, fr-FR). Enter the full absolute URL for each variant. The tool automatically includes a self-referencing tag for the current page.

  2. 2
    Configure x-default and review validation

    Enable x-default and enter the fallback URL shown to users whose language does not match any variant. Review the validation warnings — the most common error is a missing self-reference tag. The relationship table shows all language↔URL mappings at a glance.

  3. 3
    Choose output format and copy

    Toggle between HTML link tags (for your page head section) and XML sitemap format (for your sitemap.xml). Copy the output and implement on all variants of the page — every variant must include the full set of hreflang tags for the bidirectional relationship to work.

🔑Quick Reference

RuleRequired
Self-reference tag❌ Missing = invalid
Reciprocal tags❌ Missing = ignored
x-default tag⚠ Recommended
Absolute HTTPS URLs✅ Required

Frequently Asked Questions

What are hreflang tags?

Hreflang tags are HTML link elements (or XML sitemap entries) that tell search engines which language and regional version of a page to serve to users in different markets. They prevent duplicate content penalties for multilingual sites and ensure users see the correct language version in search results.

Why is a self-referencing hreflang tag required?

Every page must include an hreflang tag pointing to itself — this is the number one implementation error. Without the self-reference, Google may ignore the entire hreflang implementation for that page. If page A in English lists page B in French, page A must also include an hreflang pointing to its own URL with lang="en".

What are reciprocal hreflang tags?

Hreflang must be bidirectional. If page A includes an hreflang pointing to page B, page B must include an hreflang pointing back to page A. Google ignores one-directional hreflang implementations. This validator warns you if reciprocal tags appear to be missing based on the URLs you have entered.

What is x-default?

x-default is a special hreflang value that designates the fallback page shown to users whose language and region does not match any specific variant. It is typically the English version, a language selector page, or your main domain homepage. Google recommends including x-default in every hreflang implementation.

What is the difference between HTML hreflang and XML sitemap hreflang?

HTML hreflang tags go in the head section of each individual page — every page must include the full set of tags for all variants. XML sitemap hreflang is an alternative where you declare all language/region mappings in your sitemap.xml file using xhtml:link elements. Both methods are equally effective — choose based on your CMS and whether you control page head sections directly.

What are common hreflang implementation errors?

The five most common errors are: (1) Missing self-reference tag, (2) Missing reciprocal tags on linked pages, (3) Wrong language codes (using "uk" for Ukrainian — correct is "uk", using "jp" for Japanese — correct is "ja"), (4) Mixing HTML and XML sitemap implementation on the same site, (5) Hreflang pointing to non-canonical URLs or redirected URLs.