SEOFree · no sign-up Runs in your browser

Hreflang tag generator

List the language and region versions of a page with their URLs and get the hreflang annotations to use: link tags for the head, entries for your XML sitemap, or an HTTP Link header. Codes are checked as you type, and x-default is suggested.

Loading the tool…

How to use the Hreflang Tag Generator

  1. 1Add one row per language version: a code such as en-gb and the page's full URL.
  2. 2Add an x-default row for visitors whose language isn't listed.
  3. 3Choose HTML tags, XML sitemap or HTTP header, and fix anything the check flags.
  4. 4Copy the output and add the same full set to every language version of the page.

Frequently asked questions

Do I need hreflang for different countries with the same language?

Yes, when the pages differ, such as prices in pounds and dollars. Use en-gb and en-us so Google shows each country the right page.

Should I put hreflang in HTML or in the sitemap?

Either works the same for Google. HTML tags are simplest for small sites; sitemaps keep large sites' HTML lighter; the HTTP header is the only way for files like PDFs. Pick one method.

What URL should x-default use?

The page for visitors who match none of your languages: often the international English version, or a language selector page.

All tools

Then schedule it with Join Postly

Plan, publish and track your posts on every network from one calendar. Free plan, no credit card.

No credit card required Free forever plan Cancel anytime