Free tools › Hreflang Generator

Free Hreflang Generator

List each language or region version of a page and get correct hreflang annotations as HTML tags, an HTTP Link header or XML sitemap entries.

Free, with no sign-up. Fair-use limits apply. Text you paste is processed and not stored. To enforce the limits we keep any domain or address you enter and a scrambled form of your IP address for 30 days, as described in our privacy policy.

What hreflang does

Hreflang annotations tell search engines which language or regional version of a page to show to which visitor. Done properly they stop the wrong country’s page appearing in results. Every version must list all of the others and itself.

How to use it

Put one version per line as a code, a bar and the full URL, for example en-GB | https://example.com/uk/. Choose HTML tags for the head of the page, an HTTP Link header for non-HTML files or XML for a sitemap, then press Generate hreflang. Language codes are checked against the ISO lists and mistakes such as en-UK are flagged.

Rules worth remembering

  • Use a language code, optionally followed by a region: en, en-GB, fr-CA.
  • Include a self-reference on every page.
  • Add an x-default entry for visitors who match no version.
  • Return links must be reciprocal, or the annotations are ignored.

Check what you published

Use the hreflang checker to fetch the live pages and confirm the return tags are in place.

Frequently asked questions

Is the region code required?

No. A language code alone is valid. Add a region only when you have different versions for different countries.

Which method should I choose?

HTML tags are the simplest. Use the header for PDFs and the sitemap for very large sites.

Does Google use hreflang for ranking?

It uses it to pick the right version for a searcher, not to rank a page higher.

More free tools

See all free tools, or read about the Domain Tools in the dashboard.

Tools like this, and many more, are in the SEO Web Data dashboard. Sign up for a free trial to use them on your own sites.

Get the full toolkit for your domains