Hreflang Generator
Easily create rel="alternate" hreflang tags for your localized pages.
Hreflang Generator
Build perfect HTML tags to declare multi-regional and multilingual content variations for global SEO dominance.
Generated HTML Output
<head> section
Implementation Notice
You must paste this exact block of tags into the <head> section of all 2 pages. Every language variant must link to every other variant (including itself) to be valid.
What are hreflang tags?
The hreflang attribute tells search engines like Google about the relationship between different language and regional versions of a page. This helps Google serve the correct language or regional version of your page to the searcher based on their location and language preferences.
Golden Rules of Hreflang
- Bidirectional Links: If page A links to page B, page B MUST link back to page A. All localized versions must contain the exact same set of hreflang tags.
- Self-Referencing: A page must contain a self-referencing hreflang tag (a link pointing to itself).
- x-default: The
x-defaultvalue is used for unmatched languages. It acts as the fallback page (usually the English or global version). - Format: The language code must be in ISO 639-1 format (e.g.,
en,es). The region code, if used, must be in ISO 3166-1 Alpha 2 format (e.g.,GB,US) and comes after the language code (e.g.,en-GB).
Related Guides
Deepen your understanding with our expert articles.
