About hreflang tags
This tool generates hreflang link tags for multilingual and multi-regional websites, telling search engines which language and region each version of a page targets. Add your language/region URLs and copy the ready-to-paste tags, including an x-default fallback. It runs in your browser.
How Hreflang Generator works
How to use it
- Add a language or language-region code and the matching URL for each version.
- Optionally set an x-default URL for users who match none.
- Copy the link tags into the <head> of every page in the set.
How hreflang works
hreflang tells Google that pages are alternates of each other in different languages or regions, so the right version is shown to the right user and the pages are not treated as duplicates. Codes follow ISO formats like en, en-US or es-MX.
Important rules
hreflang must be reciprocal: every page in the group should list all versions, including itself, and ideally point to the same x-default. Mismatched or one-way tags are a common cause of errors.
Common uses
- Set up a multilingual website
- Target different countries
- Avoid duplicate-content issues across regions
- Add an x-default fallback
- Generate hreflang for many languages
- Fix international SEO errors
- Map language-region URLs
- Prepare tags for a global site