Output Format
Presets Title
Page Group Labels
Output Title
Stats Title
Validation Title
Output Title
<!-- Hreflang tags for: page -->How to Generate Hreflang Tags
- 1
Create a page group
Click Add Page Group and enter the base URL. Each group represents one piece of content that exists in multiple languages or regions. - 2
Add language variants
For each page group, add variants with the correct language code, optional region code, and the URL for that version. Mark one variant as x-default for unmatched languages. - 3
Choose your output format
Select HTML link tags for the head section, HTTP headers for non-HTML documents like PDFs, or XML sitemap format for large-scale implementation via your sitemap file. - 4
Review validation and copy the output
Check the validation panel for any issues like missing self-references or non-reciprocal links. Fix any warnings, then copy or download the generated markup.
Common Use Cases
Multi-Language Corporate Websites
E-Commerce with Regional Pricing
Content Hubs and Blog Networks
SaaS Products with Localized Landing Pages
About This Tool
Hreflang tags tell search engines which language and regional version of a page to show to users based on their location and language preferences. Introduced by Google in 2011, the rel="alternate" hreflang annotation is now supported by Google, Yandex, and other search engines. Without hreflang tags, search engines may show the wrong language version of your page in search results, or treat translated pages as duplicate content and penalize your rankings. Correct implementation ensures that a user in Germany sees your German page, while a user in Brazil sees the Portuguese version.
The hreflang specification requires three critical rules that are easy to get wrong: every page must reference itself (self-referencing), annotations must be reciprocal (if page A points to page B, page B must point back to A), and language-region codes must follow ISO 639-1 and ISO 3166-1 standards. This generator validates all three rules in real time and highlights any issues before you deploy. You can output hreflang tags as HTML link elements for the head section, HTTP headers for non-HTML resources like PDFs, or as an XML sitemap extension for sites with hundreds of language variants. For related SEO tools, use our XML Sitemap Generator to create your base sitemap or the Meta Tag Generator to optimize page-level SEO tags.