Hreflang tag generator for multilingual and multi-country sites

Add each language or country version of a page and copy a complete, valid set of hreflang tags, including x-default.

What hreflang does

Hreflang tags tell search engines which version of a page to show to which language or country, for example English for the UK, English for the US, and Arabic for Saudi Arabia. Without them, the wrong version can rank, or the versions can compete with each other.

The rules that matter

  1. Every version lists every version, including itself.
  2. Links must be reciprocal. If page A points to page B, page B must point back to A.
  3. Use valid codes: a language (en, ar), optionally followed by a region (en-gb, ar-sa). The region alone is not valid.
  4. Add x-default for visitors who match no version.
  5. Point only to canonical, indexable URLs.
ExampleValid?Why
en-gbYesEnglish for the United Kingdom
ar-aeYesArabic for the UAE
ukNo'uk' is Ukrainian, not the United Kingdom
en-ukNoThe country code for the UK is GB

Read more in my international SEO guide and Arabic SEO guide.

Questions people ask

Where do hreflang tags go?

In the head of each page, in your XML sitemap, or in HTTP headers for files like PDFs. Pick one method and use it consistently.

Do I need hreflang if I only have one language?

No. Hreflang is only for pages that have alternate language or country versions.

What is x-default?

The version shown to people who don't match any of your listed languages or countries, often your main English page or a language selector.

Found problems? I'll fix them.

Send me your site. You'll get a clear plan within a day.