Hreflang Generator
Generate hreflang tags for multilingual and multi-regional SEO
Language Versions
Generated Hreflang Tags
<link rel="alternate" hreflang="en" href="https://example.com/" /> <link rel="alternate" hreflang="es" href="https://example.com/es/" /> <link rel="alternate" hreflang="fr" href="https://example.com/fr/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
Related Tools
Schema Markup Generator
Create JSON-LD structured data markup for articles, products, events, and more
SERP Preview Tool
Preview how your webpage will look in Google search results on desktop and mobile
XML Sitemap Generator
Generate XML sitemaps for your website to help search engines crawl your pages
Structured Data Validator
Validate your schema markup and structured data for errors and warnings
Meta Tag Generator
Generate SEO, Open Graph, Twitter, verification, and structured data meta tags with live previews and exports
robots.txt Generator
Create advanced robots.txt files with multiple user-agents, sitemap management, presets, and diagnostics
What are Hreflang Tags?
Hreflang tags tell search engines which language and regional version of a page to show to users. They prevent duplicate content issues and ensure users see content in their preferred language.
This generator creates the HTML link tags you need. Add all language versions of your page, including an x-default for users who don't match any specific language.
Language Codes
- Language only: en, es, fr, de (ISO 639-1)
- Language + Region: en-US, en-GB, pt-BR (ISO 639-1 + ISO 3166-1)
- x-default: Fallback for unmatched users
Important Rules
- Self-referencing: Each page must include a tag pointing to itself.
- Reciprocal: All pages must link to each other.
- Absolute URLs: Always use full URLs, not relative paths.
- Canonical consistency: Hreflang URLs should match canonical URLs.
FAQ
Where do I put hreflang tags?
In the <head> of each page, or in HTTP headers, or in your XML sitemap.
Do I need x-default?
Recommended. It tells search engines where to send users who don't match any language.
