Skip to content
Documentation
Rule catalogue

sitemap.lastmod.invalid

<lastmod> must be a W3C Datetime, and must not be in the future

warningsite-widespec-required

Why it matters

Google stops trusting the field entirely once it finds values it cannot use — so one bad batch costs the whole site a signal it was paying to produce. Future dates count: a date that has not happened cannot describe a change that has.

What the finding looks like

The message goflag prints, with example values substituted.

warn sitemap.lastmod.invalid <lastmod> values a consumer cannot use: 3 not a W3C Datetime (March 4 2026). Google ignores the field entirely when it stops trusting it, so one bad batch costs the whole site the signal.

How to fix it

The catalogue carries no snippet for a site rule: a cross-page rule builds its remedy from what the crawl found, so goflag attaches the fix to the finding itself rather than to the rule. Run it and read the finding.

Says who?

This rule is spec-required, and it cites the documents below. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.