Hreflang Tag Generator

Generate hreflang tags for multilingual and regional pages.

Fallback for users whose language doesn't match.

hreflang tags (paste into <head>)
# Fill in the fields above to generate your code.

Hreflang tags tell search engines which language and regional version of a page to show each user, preventing the wrong-language result and duplicate-content confusion across international sites. Add your language–URL pairs below to generate valid hreflang tags.

How the Hreflang Generator works

For each version of the page, enter its hreflang code (like en, en-us, or fr) and its full URL, then add an optional x-default for users who don't match any version. The tool outputs link rel="alternate" tags to paste into every page's <head>. Each language version should list all versions, including itself, and the annotations must be mutual to work.

Example

You add en-us, en-gb, and an x-default URL.

Three hreflang link tags, ready to paste into the head.

Frequently asked questions

Hreflang annotations tell search engines the language and optional region a page targets, so they can serve the right version to the right user. They're essential for sites with content in multiple languages or for multiple countries.

Related tools

Put the metrics that matter on autopilot

Lunroo is a team of AI agents that research, write, and publish SEO content that moves numbers like these — with a human approval step, so nothing ships without your say-so.