CometWebResearch pack

Hreflang and canonical on 38 multilingual sites

Maciej Zmitrukiewicz · Research pack for Hreflang and canonical: you're fixing the wrong error

This is the material behind the article on hreflang and canonical tags. I took the multilingual sites from my shared crawl of domains from the Tranco list and read 10 to 30 pages on each, checking how hreflang and the canonical tag agree with each other.

What I looked at

The shared crawl from November 2026 found hreflang on 108 of 471 homepages. I drew 42 of those sites with at least two annotations, split between the global top 10,000, mid-ranking domains and Polish domains, and 38 of them let me read the homepage. On each site I read the homepage, up to seven pages linked from it, and up to three language versions of every page that carried hreflang.

Each annotation set went through the same parser and validator that runs our hreflang checker. On top of that the script compared live pages: does the page list itself, does each language version link back, what status the version returns, and where its canonical points. Requests were plain HTTP without JavaScript, 8 sites in parallel, one request at a time within a site, with a short pause, with the user agent CometWebResearch/1.0.

Pages whose canonical points to a clean copy of themselves, such as a URL with a tracking parameter, are counted separately, because they're not supposed to carry their own hreflang set. Return links are counted only from pages whose canonical points to themselves.

Results

What I checkedPages or linksSites
Pages read (status 200)704, of which 657 carry hreflangn/a
Canonical pages that list themselves in hreflang599 of 6176 / 38 miss it somewhere
Subpages that carry the homepage set instead of their own132 / 38
Alternates answering 200 that link back425 of 46010 / 38 miss one somewhere
Canonical points to a version in another language171 / 38
Canonical points to the x-default page or another page43 / 38
hreflang points to a URL whose canonical names another URL112 / 38
Alternate redirects before answering 20029 of 4697 / 38
One language code points to two different URLs34 pages3 / 38
Invalid language or region code (en-UK, en_US, a country used as a language)00 / 38
x-default present374 of 657 pages20 / 38, every page on 16
Relative URL in hreflang34 pages2 / 38
None of the hard problems above on the pages I readn/a24 / 38

Why the 35 language versions didn't link back: 22 listed other versions but not the page, 10 listed only themselves and 3 had no hreflang at all. Of the redirecting alternates, 18 belong to one site whose hreflang lists translated pages that redirect to the English original. Eight alternates on one site answered 403 from a sister domain, which looks like a firewall blocking my requests, so I don't count that as a broken page.

Lowercase regions such as pt-br show up on 10 sites, but Google treats the codes as case-insensitive, so they're not errors. The code uk appears on two sites, and on the one I could check the target page is in Ukrainian, which is exactly what uk means.

What this data can't tell you

Files

To repeat it, run sample.py, then node measure.mjs, analyze.py and figures.py. Sites carry the identifiers from the shared crawl, so site-123 means the same site in every pack built on it. Hosts, URLs and paths stay on my disk.

Back to the article