Hreflang Tag Generator — Help & Documentation
Generate correct hreflang tags for multilingual and multi-regional websites. Supports HTML, HTTP headers, and XML sitemap formats with built-in validation.
Key Features
- Support for 100+ language and region combinations
- HTML link tags, HTTP headers, and XML sitemap output
- Automatic x-default tag generation
- Validation of language and region codes
- Loop and conflict detection
How to Use
Add your page URLs with their corresponding language and region codes.
Choose the output format — HTML link tags, HTTP headers, or XML sitemap.
Set the x-default URL for users whose language is not specifically targeted.
Copy the generated tags and add them to your pages.
What Are Hreflang Tags?
Hreflang tags tell search engines which language and regional version of a page to show users. They are essential for international SEO and preventing duplicate content issues across language versions of the same page.
Each hreflang attribute uses an ISO 639-1 language code (e.g., en, fr, de) optionally combined with an ISO 3166-1 Alpha-2 region code (e.g., en-US, en-GB, fr-FR).
Best Practices
- Always include a self-referencing hreflang tag on each page.
- Use the x-default value for your fallback or language-selector page.
- Ensure hreflang tags are reciprocal — each page must reference all others.
- Use correct ISO 639-1 language codes and ISO 3166-1 Alpha-2 region codes.
- Avoid redirect chains between hreflang-linked pages.
- Test implementation using Google Search Console's International Targeting report.
Supported Output Formats
- HTML <link> tags — Add to the <head> of every language variant
- HTTP response headers — For non-HTML content like PDFs
- XML sitemap entries — Centralized implementation via sitemap