Hreflang Generator
Create hreflang tags for multi-language and multi-region sites.
<!-- Fill in the form above -->Related Tools
Meta Tag Generator
Generate meta tags, Open Graph tags, and Twitter Card markup for any page. Real-time preview with copy and download.
Use tool →Canonical Checker
Verify canonical URL tags in your page source.
Use tool →Robots.txt Generator
Build a robots.txt file with User-agent, Allow, Disallow, and Sitemap directives.
Use tool →Schema.org Generator
Generate JSON-LD structured data for LocalBusiness, Product, FAQ, Article, and 12+ schema types.
Use tool →How to Use the Hreflang Generator
Add a language version for each translation of your page. Pick the language, optionally pick a region, and paste the full URL. The generator builds the <link rel="alternate"> tags you need. Copy the output and drop it into your page's <head>.
Set an x-default URL if you have a language-neutral landing page or want to control what users see when none of your specified languages match. Every tag is generated with properly escaped attributes, so the markup is always valid HTML.
What Are Hreflang Tags?
Hreflang tags tell search engines which language and regional version of a page to show in results. If you have an English page and a Spanish page covering the same content, hreflang tags prevent Google from picking the wrong one for a given user. Without them, your Spanish page might show up for English searchers, or vice versa.
They're essential for any site serving content in multiple languages or targeting different countries with the same language (English for the US vs. English for the UK, for example). Search engines don't guess well here. Tell them explicitly.
Common Hreflang Mistakes
The most common mistake is forgetting reciprocal links. If page A points to page B with hreflang, page B must point back to page A. One-way hreflang tags get ignored. Second most common: using wrong language or region codes. It's en-GB, not en-UK. ISO codes aren't always intuitive.
Forgetting x-default is another frequent oversight. Without it, search engines have to guess what to show users who don't match any of your specified languages. That guess is usually wrong. Set an x-default and remove the ambiguity.
What is x-default and do I need it? +
Do I need hreflang if I only have one language? +
Should hreflang go in the HTML head or the sitemap? +
<head> is simpler and easier to debug. Putting them in your XML sitemap scales better for large sites with hundreds of language variants. Pick one approach and stick with it. Don't mix both for the same pages.