Hreflang Tag Generator
Generate correct hreflang tags for your multilingual website. Output as HTML link tags or XML sitemap format.
This tool runs entirely in your browser. No data is sent to any server.
Generated Code
Frequently Asked Questions
What are hreflang tags?+
Hreflang tags tell search engines which language and regional version of a page to show to users. They help prevent duplicate content issues across multilingual sites and ensure users see the right language version in search results.
What is x-default in hreflang?+
The x-default hreflang value specifies the default page to show when no other language/region matches the user. It's typically set to your primary language version or a language selector page.
Should I use HTML tags or sitemap format for hreflang?+
Both are valid. HTML link tags are simpler for small sites. The sitemap format is better for large sites with many language versions, as it keeps the markup out of your page HTML and is easier to manage at scale.
Do hreflang tags need to be reciprocal?+
Yes. If page A points to page B with hreflang, page B must also point back to page A. Missing reciprocal tags are one of the most common hreflang implementation errors and can cause search engines to ignore the tags.
What's the difference between language and region in hreflang?+
Language (e.g., 'en') targets all users of that language globally. Adding a region (e.g., 'en-US' vs 'en-GB') targets users in a specific country. Use region codes when you have country-specific content, like different pricing or spelling.