Hreflang Tag Generator

Generate hreflang link tags for multilingual or multiregional pages, with validation of language region codes and an optional x-default.

Runs on your device

Result

Results appear here after you select “Generate”.

What it does

If you have the same page in English and Urdu, or for the UK and the US, hreflang tells search engines which version to show to whom. Every version must list all the others, including itself.

How to use it

  1. Enter one "code URL" pair per line, for example "en-GB https://example.com/uk/".
  2. Add an optional x-default URL.
  3. Paste the tags into the head of every listed page.

Example

The example fills in realistic values and runs the tool. Select Try an example above to see it.

When it helps

  • Bilingual English/Urdu sites.
  • Regional pricing pages.
  • International stores.

Questions

Which codes are valid?

An ISO 639-1 language code, optionally followed by an ISO 3166-1 region: en, ur, en-PK, fr-CA. "en-UK" is wrong; the UK code is GB.

What is x-default?

The page for users whose language or region you have not listed, often a language selector.

More seo tools

See all 10

People also use

Browse all 200 tools