Tools/Hreflang Generator

Free Generator

Hreflang Tag Generator

Build valid <link rel="alternate" hreflang> tags for international SEO. Add your locale and URL pairs, configure x-default, and copy the output straight into your page <head>.

Free. No signup. Runs entirely in your browser.

Configure your hreflang tags

Hreflang code

Absolute URL

Marks the fallback page for users whose language or region does not match any specific locale.

Reciprocal annotation required

Paste the same set of tags on every URL in the set — including the page pointing to itself. Google ignores hreflang annotations that are not reciprocated by every page they reference.

Your hreflang tags

Paste inside <head>

Add at least one hreflang code and URL to generate tags.

Implementation checklist

  • Paste in <head>. Place all tags before </head>. Order does not matter.
  • Use absolute URLs. Include the full domain and protocol. Match the canonical URL exactly.
  • Reciprocate on every page. Every URL in the set must carry the full set of tags, including a self-referencing tag.
  • Verify in Search Console. Google Search Console flags hreflang errors under Coverage. Check within 24 hours of deploy.

How hreflang works

Tell Google which page to serve, to whom

01

Match language to user

Google reads your hreflang tags and routes users to the correct language version. Without them, a Spanish speaker in Madrid may land on your English page and leave immediately.

02

Prevent duplicate content

Regional variants (en-US vs en-GB, pt-BR vs pt-PT) look like duplicate pages to crawlers. Hreflang signals they serve different markets, preventing consolidation or ranking suppression.

03

x-default catches the rest

x-default marks the page Google shows when no hreflang tag matches the users locale. Usually your homepage or a language-selector page. Always include it for complete coverage.

Frequently asked questions

Going international?

Hreflang is step one. Revenue attribution is the point.

Correct hreflang routes the right user to the right page. A paid-to-organic gap analysis shows which of those markets have paid spend you can shift to organic search permanently.