Hreflang and canonical on 38 multilingual sites
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 checked | Pages or links | Sites |
|---|---|---|
| Pages read (status 200) | 704, of which 657 carry hreflang | n/a |
| Canonical pages that list themselves in hreflang | 599 of 617 | 6 / 38 miss it somewhere |
| Subpages that carry the homepage set instead of their own | 13 | 2 / 38 |
| Alternates answering 200 that link back | 425 of 460 | 10 / 38 miss one somewhere |
| Canonical points to a version in another language | 17 | 1 / 38 |
| Canonical points to the x-default page or another page | 4 | 3 / 38 |
| hreflang points to a URL whose canonical names another URL | 11 | 2 / 38 |
| Alternate redirects before answering 200 | 29 of 469 | 7 / 38 |
| One language code points to two different URLs | 34 pages | 3 / 38 |
| Invalid language or region code (en-UK, en_US, a country used as a language) | 0 | 0 / 38 |
| x-default present | 374 of 657 pages | 20 / 38, every page on 16 |
| Relative URL in hreflang | 34 pages | 2 / 38 |
| None of the hard problems above on the pages I read | n/a | 24 / 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
- These are sites from a traffic ranking: the top 10k, the middle of the list and .pl domains of any rank. A small company site with a translation plugin can look quite different.
- I read up to 30 pages per site, so "no problem found" means no problem on those pages, not on the whole site.
- Without JavaScript I can't see hreflang or canonical tags added by a script after load, and I didn't read hreflang from XML sitemaps.
- Nothing here shows which URL Google actually picked for these sites. Only the site's own Search Console shows that.
Files
summary.json: every number in one file.sites.csv: one row per analysed site with counts for each check.pages.csv: one row per page: number of annotations, self-reference, canonical state, x-default and validator findings.alternates.csv: one row per checked language version: status, return link and whether its canonical points elsewhere.sample.py: draws the sites from the shared crawl (needs the private raw data, so it is there to read).measure.mjs: reads the pages and language versions, using hreflang-lib.mjs.hreflang-lib.mjs: the hreflang parser and validator from cometweb.io/tools/hreflang.analyze.py: turns the raw records into the files above.figures.py: draws the two charts in the article from summary.json.
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.