Daylytix

Hreflang: the checks and the tag generator

Hreflang tags tell search engines which language or country version of a page to show. The Hreflang tab, under Technical in the audit results, checks the tags on your pages. At the bottom of the tab, a generator writes the correct tags for you. Hreflang is one of the 21 scored areas, and a site in one language is left out of it.

What the tab checks

FindingWhat it means
Invalid codesA value Google cannot read, such as en-UK (the code for the UK is GB) or en_US with an underscore.
No self referenceA page lists the other versions but not itself. Each version must name itself too, or Google may ignore the set.
No return linkPage A points to page B, and page B does not point back.
Canonical conflictA page has hreflang tags, but its canonical points to another address. Google follows the canonical and ignores the tags.
No x-defaultPages offer two or more languages but no page for visitors who match none of them.
Pages without hreflangSome pages have tags and these do not.

Using the tag generator

  1. Open the Hreflang tab of an audit and scroll to Hreflang tag generator.
  2. Pick a set from the list, or type your own: one line per version, a language code and then the full address.
  3. Click Generate tags.
en https://example.com/en/
de https://example.com/de/
x-default https://example.com/

Use x-default for the page for everyone else. It is optional, and the generator says so when it is missing. Up to 300 lines fit in one set.

Where the sets come from

  • From your tags. Pages that point to each other form a set. Missing return links and self references are filled in, and wrong codes are corrected. The list shows how many pages need changes, or says the set is complete.
  • Guessed. If your site has no hreflang tags at all, we look for addresses that differ only in a language folder or subdomain, such as /en/about and /de/about. A page whose language does not match its folder is left out. These sets are marked as guesses, so check them first.

An audit shows up to 20 sets, the ones that need work first. Audits made before November 2, 2026 have no sets, so type your own lines there.

What it corrects

You writeYou get
en_usen-US
en-uken-GB
ENen
zh-hantzh-Hant
jp, cnja, zh

Each change is listed above the result. A code it cannot fix, a line it cannot read, an address that is not a full one, or two addresses for one code are named as problems, and those lines are left out.

Using the result

You get three forms of the same set. You need only one of them.

  • HTML goes in the <head> of every page in the set. Each page gets the same tags, including the one for itself.
  • XML sitemap holds one entry per address, in place of the HTML tags.
  • HTTP header is for files with no <head>, such as PDFs.

Run a new audit after you add them to see the tab clear.

Still stuck?Email us and we reply within 24 hours on working days.
hello@daylytix.com