How to Generate Valid Hreflang Tags
Add your language URL variants and copy ready-to-use HTML or XML sitemap code.
- Always include an x-default tag as a fallback for unmatched languages.
- Every language variant should include return links to all other variants and itself.
1. Add Language Codes & URLs
Enter all language variants (e.g., en, hr, de) plus your x-default fallback URL.
2. Copy HTML or XML Sitemap Output
Choose between <link rel='alternate'> tags for <head> or <xhtml:link> for sitemap.xml.
Why Hreflang Matters for International SEO
The most frequent international SEO error is missing return links or forgetting the x-default fallback.
This tool outputs both HTML <head> link tags and XML sitemap <xhtml:link> blocks.
Right Language for Every Market
Users see the localized version of your page in their country's search results.
No Cross-Language Cannibalization
Helps Google distinguish regional variants cleanly.
FAQ
Quel format de code langue utiliser ?+
ISO 639-1 (fr, en, hr) ou langue-région (fr-CA, en-GB).
À quoi sert x-default ?+
C'est l'URL de repli pour les langues non listées.
HTML ou Sitemap XML ?+
Les deux sont valides tant que la réciprocité est respectée.
Qu'est-ce que l'auto-référencement hreflang ?+
Chaque page doit aussi pointer vers elle-même.