Website & SEO
Hreflang Generator
Have a page in more than one language? Add each version and get the hreflang tags that tell Google which one to show to whom.
Output format
Nothing is fetched or uploaded. The tags are made from what you type, in your browser. The tool does not check that your pages exist or link back to each other.
How to use it
- Add one row for each version of the page: the language code and its full address.
- Include the page itself, and add an
x-defaultrow for visitors who match no language. - Copy the tags and put the same full set on every version of the page.
What hreflang does
Hreflang tells search engines which language or region each version of a page is for, so people see the right one in results. It is a signal that helps, not a command.
The rules that matter
- Every version lists all versions, including itself. If page A points to page B, page B must point back to A.
- Use full addresses, including https://.
- Use a language code (
en), optionally followed by a region (en-GB). Region alone is not valid. x-defaultmarks the fallback page, often a language chooser or your main version.
Which format to use
Use only one method for a page. HTML tags in the <head> are the simplest. Sitemap lines suit large sites. The HTTP header is for files that have no HTML, such as PDFs.
Tested, not guessed
Every number below comes from running this tool, not from a guess.
Example
Three versions of one page: en, en_gb and x-default:
en https://example.com/
en_gb https://example.com/uk/
x-default https://example.com/
Gives you (note that en_gb is fixed to en-GB for you):
<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Frequently asked questions
Do I need hreflang for one language?
No. It helps only when you have several versions of the same page, for different languages or regions.
Why do the tags need to be on every version?
Search engines ignore a hreflang link when the other page does not link back. Adding the full set to all versions keeps them confirmed.
Does it change my rankings?
It does not boost rankings. It helps the right version show to the right people.
Is anything sent to a server?
No. Everything happens in your browser.