CompleteSEOTools
Home › SEO Tools › Hreflang Generator and Checker

Hreflang generator and checker

Build hreflang annotations, or paste yours to find mistakes.

About Hreflang Generator and Checker

Hreflang tells search engines which language or regional version of a page to show to which visitors. The generator takes a list of language codes and URLs and writes the tags as HTML link elements, as an HTTP header, or as sitemap entries. The checker reads tags you paste from one or several pages and flags invalid codes, relative URLs, a missing self-reference, no x-default and pages that do not link back. It can only judge the pages you paste.

  • Setting up a site in several languages.
  • Checking a template before it goes live.
  • Finding the usual en-UK instead of en-GB error.
  • Making the sitemap version for sites with many pages.

How to use Hreflang Generator and Checker

1

Step 1

Enter each language version as code, a separator and the full URL.

2

Step 2

Choose HTML, HTTP header or sitemap output and copy it to every version.

3

Step 3

To audit, switch to the checker and paste the tags for each page, one block per page.

Good to know

  • Every version must list all the others and itself. If page A points to B, B must point back to A or both may be ignored.
  • Use the language first, then an optional region. Country alone, such as uk, is not valid.
  • Hreflang is a hint, not a command. Google may still show a different version.

Common questions

What is x-default?

A fallback URL for visitors whose language matches none of your versions, often a language picker or the main version.

Which language codes are accepted?

Two-letter ISO 639-1 languages, optionally with a four-letter script and an ISO 3166-1 region, such as en, pt-BR or zh-Hans-CN.

Can the checker fetch my pages?

No. It works only on text you paste, so it cannot see pages you leave out.