Hreflang Tag Generator
Generate correct hreflang <link> tags for multilingual and multiregional websites. Add all language/region URL variants and copy the output.
URL Variants
Add each language/region version of this page with its corresponding hreflang code.
Common Hreflang Codes
Frequently Asked Questions
hreflang="x-default" signals the fallback URL to use when no other language/region variant matches the user's settings. This is typically your main homepage or a language selection page. Google recommends including it whenever you implement hreflang.<head>, in HTTP response headers (for non-HTML files), or in your XML sitemap. The sitemap approach is the easiest for large sites with many language versions as it centralizes all annotations in one file.How It Works
Add Language Variants
Enter each URL variant with its hreflang code. Click the common codes to auto-fill the language field quickly.
Choose Output Format
Switch between HTML link tags (for <head>), HTTP headers, or XML sitemap xhtml:link format depending on your implementation preference.
Copy to All Pages
Copy the generated tags and add the same full set to every page in the language group — each page must include tags for all variants.
Common Use Cases
Multilingual Websites
Sites with content in English, French, Spanish, etc. use hreflang to ensure Google shows users the version matching their browser language.
Country-Specific Sites
E-commerce sites with US, UK, and AU versions of the same page use en-US, en-GB, en-AU hreflang tags to serve the right pricing and currency.
Duplicate Content Prevention
For pages with similar content in multiple languages, hreflang prevents Google from treating them as duplicate content and diluting ranking signals.
International SEO Campaigns
Brands expanding into new markets use hreflang to ensure their translated landing pages rank in the target country's Google, not in the origin country's index.
Site Migrations
When restructuring a multilingual site (e.g., changing URL structure), hreflang helps Google re-map the correct relationships between old and new URLs.
Language Selector Pages
Use x-default to designate a global landing page that lets users choose their language, so Google knows where to send visitors with no matching locale.