Skip to content
Documentation
Rule catalogue

hreflang.sitemap-mismatch

<head> alternates advertise a locale the sitemap does not list

needs-judgmentasked, not answered

Why it matters

The head and the sitemap are two declarations of one intent, produced by different code paths, so they drift. This is the direction no specification covers: nothing requires an hreflang-declared page to appear in a sitemap, and a page deliberately kept out of it is doing nothing wrong. So goflag stopped calling it a defect and started asking about it — you get both lists and the question, and you decide which of your two generators is wrong.

What goflag asks you

Printed under “Needs judgment” with --advisories, alongside the observed facts the answer turns on. goflag never fills in the verdict.

hreflang.sitemap-mismatch (6 pages)
Your <head> advertises a translation your sitemap does not list. Is the sitemap missing an entry, or is the alternate pointing at a page you did not mean to publish?

How to fix it

This rule ships no snippet, because the remedy is a judgement rather than a line of code: the finding tells you what is out of range, and what to put there is yours to decide.

Says who?

This rule runs on the cross-page contract, which does not yet carry sources. It picks them up when the site-level rules move onto the same descriptor as the page rules.