Sitemap lastmod disagrees with the page's dateModified
When lastmod and the page's own dateModified disagree, one of them is wrong. squirrel compares them per URL and separates the two directions.
What lastmod drift is
A page usually carries its own modification date twice: once in the sitemap as <lastmod>, and once on the page as schema dateModified or a visible updated date. Both are supposed to describe the same event.
When they disagree, the sitemap generator and the page renderer are reading different fields. A lastmod older than the page’s own date tells crawlers not to bother with a page that has in fact changed, and usually means a stale cached sitemap or a generator resolving publishedAt where the page renders updatedAt. A lastmod newer than the page’s date usually means it is stamped at deploy time.
What squirrel checks
The rule is site-wide. For each crawled page it looks up the sitemap lastmod by normalised URL, then resolves the page’s own date from the first of three sources that yields a usable value: the dateModified of the JSON-LD node describing this document, the dateModified markup the parser lifted from the page, or the visible published date. Pages with no lastmod or no page-side date are skipped rather than reported.
- Skipped when no sitemap was discovered. Message:
No sitemap to compare. - Skipped when no pages were crawled. Message:
No pages to compare. - Skipped when no URL had both values. Message:
No sitemap URL carries both a lastmod and a page-side date signal. sitemap-lastmod-behind-pagewarns when the page’s own date is newer thanlastmodby more thanbehind_days, 7 by default. Message:12 page(s) have a sitemap lastmod older than the page's own dateModified by more than 7 day(s).sitemap-lastmod-ahead-of-pagewarns whenlastmodis newer than the page’s date by more thanahead_days, 30 by default. Message:40 page(s) have a sitemap lastmod newer than the page's own dateModified by more than 30 day(s).sitemap-lastmod-driftpasses when neither fired. Message:220 sitemap URL(s) carry a lastmod consistent with the page's own dateModified.
Each item reads lastmod <lastmod> vs dateModified <pageDate> (<N> day(s)) and records which of the three sources the page date came from. The day count is truncated rather than rounded, so a 7.5 day gap reports as 7 and does not warn. A lastmod that names only a year or a month, which the W3C Datetime format allows (2024, 2024-09), covers that whole year or month, and a date with no time (2024-09-10) covers that whole day. The page’s own date is read the same way, so a dateModified of 2024 is the whole year. Two dates that overlap agree, and two that do not are measured between their nearer ends, not from a first day: 2024-03-01 and 2024-03-10 are 8 days apart. A datetime with no time zone is read in UTC. A date in another format is read as written, in the zone it names (Tue, 10 Sep 2024 12:00:00 GMT) or else in UTC, so 2024/09/10 is the 10th on every machine. A date is left out rather than guessed when it is shaped like an ISO date but is not a W3C Datetime (2024-9, 2024-09-31), names a zone anywhere but at its end (Sep 10 2024 EST 12:00), has no four-digit year, or names a day that does not exist (Feb 30, 2024). Findings are capped at 50 items, with the real total in the details. Severity warning, weight 4.
An Article-family JSON-LD node wins over any other document node wherever it sits in the graph, so a sitewide WebSite node emitted first by an SEO plugin cannot supply the date.
How to fix it
Drive both values from the same content-modification timestamp. Check the field precedence on each side: a generator reading publishedAt ?? updatedAt while the page renders updatedAt ?? publishedAt passes every presence check and still disagrees on every post that was ever edited.
| Rule ID | crawl/sitemap-lastmod-drift |
| Category | Crawlability |
| Scope | Site-wide |
| Severity | warning |
| Weight | 4/10 |
Options
| Option | Type | Default | Description |
|---|---|---|---|
ahead_days | number | 30 | Days a sitemap lastmod may run ahead of the page’s own dateModified before warning |
behind_days | number | 7 | Days a sitemap lastmod may lag the page’s own dateModified before warning |
Configuration example
[rule_options."crawl/sitemap-lastmod-drift"]
ahead_days = 14
behind_days = 3Enable / disable
Disable this rule
[rules]
disable = ["crawl/sitemap-lastmod-drift"]Disable all Crawlability rules
[rules]
disable = ["crawl/*"]Enable only this rule
[rules]
enable = ["crawl/sitemap-lastmod-drift"]enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.
Related rules
- crawl/sitemap-lastmod-churn: every lastmod carrying the same build date.
- content/date-agreement: the dates a single page shows in its own markup and text.
- content/freshness: which date signals the page publishes about itself.
- eeat/content-dates: whether the page publishes a date at all.
Crawlability findings ship in every audit next to the SEO, performance and agent experience rules. See The Screaming Frog alternative for agents for how an agent works through a report.
References
Check your site
Run squirrel audit https://example.com and open the Crawlability section of the report. Each mismatched URL is listed with both dates and the gap in days. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.