Generate correct hreflang tags for your multilingual or international website. Avoid duplicate content penalties and ensure Google serves the right language version to each user.
Page Variations
Add each language/region version of the same page. Include all variants — each page must link to all others, including itself.
Output Format
✅ Your Hreflang Tags
Paste these
<link> tags inside the <head> section of each language version of your page.
What Are Hreflang Tags?
Hreflang tags are HTML attributes placed in the head section of each page that tell Google which language and regional version of a page to serve to users in specific locations. Without them, translated pages may be flagged as duplicate content or shown to the wrong audience.
Getting hreflang syntax right manually is notoriously error-prone. A single missing return link in a hreflang set causes Google to ignore the entire group. Incorrect ISO language codes, uppercase country codes used as language codes, and tags pointing to redirecting URLs are all common mistakes that silently break international SEO. This free hreflang generator validates structure as you build and produces clean, correct output.
How Hreflang Tags Work
A hreflang tag placed in the head of each page signals three things to Google. First, it tells Google the language of the current page using ISO 639-1 two-letter codes like en, fr, or de. Second, it identifies all other language or regional versions of the same content. Third, it designates a fallback x-default URL for users whose language or region does not match any specific variant.
| hreflang value | Targets | Example URL |
|---|---|---|
| en | All English speakers globally | /en/ |
| en-US | English speakers in the United States | /en-us/ |
| en-GB | English speakers in the United Kingdom | /en-gb/ |
| fr | All French speakers globally | /fr/ |
| fr-FR | French speakers in France | /fr-fr/ |
| x-default | All other regions (fallback) | / |
The Reciprocity Rule
The most critical hreflang requirement is reciprocity: every page in a hreflang group must link to every other page, including itself. If your English US page links to your English UK and French pages, the English UK page must also link back to English US and French, and the French page must link back to both English versions. A broken return link anywhere in the set causes Google to discard the entire group. This is the most common reason hreflang implementations fail silently.
Common hreflang mistake to avoid: Pointing hreflang tags to redirecting URLs. If your tag points to a URL that 301 redirects to another URL, Google may not follow the redirect for hreflang purposes and the tag will be invalid. Always ensure your hreflang target URLs are final destination URLs with no redirects. Confirm by loading each URL in a browser and verifying no redirect occurs before generating your tags.
HTML Head vs XML Sitemap Implementation
Hreflang attributes can be declared in your XML sitemap using the xhtml:link element rather than in the HTML head section. Sitemap-based hreflang is easier to manage for large sites with many language variants because changes do not require touching individual page templates. Whichever method you choose, use it consistently. Mixing HTML head hreflang on some pages and sitemap hreflang on others can create conflicting signals. This generator outputs both formats.
Frequently Asked Questions About Hreflang Tags
Declare hreflang in your XML sitemap instead of HTML head for easier management on large sites.
Open Tool →Ensure crawlers can access all language versions of your pages. Review robots.txt after hreflang setup.
Open Tool →Preview how each language version title and description appear in search results for regional audiences.
Open Tool →