---
title: "Your Page Has Three \"Last Updated\" Dates: Make dateModified, Sitemap lastmod and Last-Modified Agree"
slug: datemodified-lastmod-last-modified-agree
published: 2026-11-24T13:13:44.079782+00:00
updated: 2026-11-24T13:13:44.079782+00:00
author: "M Asif Rahman"
author_url: https://ar.bd
category: "AI Readiness"
tags: check:C3, check:D2, dateModified, lastmod, Last-Modified, sitemap, JSON-LD, freshness
description: "We read 26 posts on our five sites: JSON-LD and sitemap dates agreed on all 26, the Last-Modified header on none. One date source fixes all three signals."
url: https://aiscan.site/blog/datemodified-lastmod-last-modified-agree
---

A page can carry four or five dates: the date the reader sees, `datePublished` and `dateModified` in the JSON-LD, `<lastmod>` in the sitemap, and the HTTP `Last-Modified` header. They should all describe the same edit. On 24 November 2026 we read 26 recent posts on our own five sites, and the dates in the page agreed with the sitemap on all 26, while the HTTP header matched the content date on none of them.

No AI vendor documents which of these dates its crawler reads, so the safe position is the boring one: make every date describe the last real change to the content, and leave out any date you cannot keep honest.

## Quick summary

| Signal | Where it lives | Who defines it | What it should mean |
|---|---|---|---|
| Visible date | The byline on the page | Google's byline-date guidance | "Published" and, after a real change, "Last updated" |
| `datePublished`, `dateModified` | JSON-LD (`BlogPosting`, `Article`) | schema.org | First publication, last real change |
| `<lastmod>` | `sitemap.xml` | sitemaps.org protocol | Last significant change, never the sitemap's build time |
| `Last-Modified` | HTTP response header | RFC 9110 §8.8.2 | When the server believes this representation changed |
| `<pubDate>` | RSS feed item | RSS 2.0 | Publication only; RSS items have no "updated" field |

AIScan's [content checks](https://aiscan.site/docs/checks/content) look for JSON-LD on the page (check C3) and its [discoverability checks](https://aiscan.site/docs/checks/discoverability) look for a reachable sitemap (check D2). Neither one compares the dates with each other, so a site can score 100 and still send three different answers.

## What we found on our own five sites

Every figure below was fetched from our own servers: we read the five newest posts from aiscan.site, xspeedcache.com, bettershield.ai and thinkrank.ai, and six recent posts from storeseo.com, with `curl` and a short Python parser on 24 November 2026. For each page we read the visible date, the JSON-LD, the sitemap entry, the response headers and the feed item.

| Site (posts read) | Visible date matches `dateModified` | `<lastmod>` matches `dateModified` | `Last-Modified` header |
|---|---|---|---|
| aiscan.site (5) | 4 of 5 | 5 of 5 (day only) | not sent |
| xspeedcache.com (5) | 5 of 5 | 5 of 5 (day only) | sent, the deploy time on all 5 |
| storeseo.com (6) | 6 of 6 (shows "updated" when it differs) | 6 of 6 (to the millisecond) | sent, the deploy time on all 6 |
| bettershield.ai (5) | 5 of 5 | 5 of 5 | not sent |
| thinkrank.ai (5) | 5 of 5 | 5 of 5 (midnight UTC) | not sent |
| **Total (26)** | **25 of 26** | **26 of 26** | **0 of 26 match the content** |

Three things stand out.

**The header is the date that lies.** On xspeedcache.com every post said `Last-Modified: Tue, 24 Nov 2026 09:17:41 GMT`, and on storeseo.com every post said 10:25 the same morning, including a post published on 24 September and last edited on 4 October. Both sites rebuild and redeploy as a whole, and the web server stamps each file with the time the build wrote it. The header is accurate about the file and wrong about the article.

**Our own byline missed one update.** A post on this blog was corrected on 24 November. Its JSON-LD, its `article:modified_time` and its sitemap entry all moved to 24 November, but the byline still showed only the publication date, 22 November. A reader and a crawler reading the visible text get an older answer than one reading the markup.

**Feeds cannot carry the update.** RSS 2.0 items have a `<pubDate>` and nothing for "modified", so an updated post looks unchanged in every feed we read. That is fine as long as nothing else pretends otherwise.

## What the specifications say

The sitemap protocol is direct about it. [sitemaps.org's protocol page](https://www.sitemaps.org/protocol.html) says, in its own words, that the date "must be set to the date the linked page was last modified, not when the sitemap is generated," and that `lastmod` "is separate from the If-Modified-Since (304) header the server can return."

[According to Google's sitemap documentation](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap) (last updated 8 July 2026), Google uses `<lastmod>` only "if it's consistently and verifiably (for example by comparing to the last modification of the page) accurate." The same page counts "an update to the main content, the structured data, or links on the page" as significant, and a copyright-year change as not. Adding a link to an older post is a real change by that definition.

For `Last-Modified`, [RFC 9110 §8.8.2](https://www.rfc-editor.org/rfc/rfc9110.html#name-last-modified) says an origin server "SHOULD send Last-Modified for any selected representation for which a last modification date can be reasonably and consistently determined." That word "consistently" is the escape hatch: if your build cannot tell the server when the article changed, sending no header is allowed.

[schema.org defines `dateModified`](https://schema.org/dateModified) as "the date on which the CreativeWork was most recently modified." [According to Google's byline-date guidance](https://developers.google.com/search/docs/appearance/publication-dates), a page should show a visible date labelled with text like "Publish" or "Last updated" and add `datePublished` and `dateModified` in structured data.

And for AI answers specifically, according to Google's AI features page (last updated 10 December 2025), there is "no special schema.org structured data that you need to add." No other vendor we know of has said which date its crawler trusts, so we do not claim one does.

## The fix: one date source, written only on a content change

The rule fits every stack: store the last-modified date once, next to the content, and derive every other date from it. Never use the build clock.

| Stack | Source of truth | Feeds the byline and JSON-LD | Feeds `<lastmod>` | Common trap |
|---|---|---|---|---|
| Astro | `updatedDate` in frontmatter | the post layout | `serialize()` in `@astrojs/sitemap` | the site-wide `lastmod` option |
| Next.js | the post's own updated field | `generateMetadata` and the JSON-LD script | `lastModified` in `app/sitemap.ts` | `new Date()` in the sitemap |
| WordPress | `post_modified_gmt` | the theme and the SEO plugin | the SEO plugin or the core filter | a theme that prints only the publish date |
| Static host (nginx, Apache) | the build's content date | n/a | n/a | file times rewritten on every deploy |

Which row are you on? If you are not sure, run the three-line test further down on one post you have not edited in a month: whichever date says "today" is the one your build is stamping.

**Astro.** Keep `pubDate` and an `updatedDate` field in the post's frontmatter. Render the byline and JSON-LD from those two fields. In `@astrojs/sitemap`, the `serialize()` option lets you set `lastmod` per URL; the site-wide `lastmod` option stamps one date on every page, so do not use it for a blog.

**Next.js.** In `app/sitemap.ts`, set `lastModified` from the post's own data. The framework's documentation example uses `lastModified: new Date()`, which stamps every URL with the build time on each deploy. Use the same field in `generateMetadata` and in the JSON-LD script.

**WordPress.** The post's `post_modified_gmt` is the source of truth. The WordPress 5.5 developer note shows the `wp_sitemaps_posts_entry` filter for adding `lastmod` from it if your sitemap prints none. [ThinkRank](https://thinkrank.ai) is the plugin we recommend for WordPress here, because one plugin owns the sitemap, robots.txt and llms.txt instead of three plugins disagreeing over them. Yoast, Rank Math and AIOSEO also generate sitemaps; whichever you use, run the test below after an edit.

**The header on a static host.** If every deploy rewrites every file, either stop sending `Last-Modified` and keep `ETag`, or set each file's modification time from its content date during the build (for example `touch -d "$UPDATED" dist/blog/slug/index.html`). Our guide to [ETag and Last-Modified](https://aiscan.site/blog/conditional-requests-etag-last-modified) covers the server side.

**The byline.** Print "Updated" next to the publication date whenever `dateModified` is a different day. StoreSEO's posts already do this; ours did not on 24 November.

## Verify it

Run the scan first, so the structured data and the sitemap are both in place:

```bash
npx aiscan-cli yoursite.com
```

Look for C3 (JSON-LD present) and D2 (sitemap found). Then compare the dates on one post by hand:

```bash
URL=https://yoursite.com/blog/some-post/
curl -s "$URL" | grep -o '"date\(Published\|Modified\)":"[^"]*"'
curl -sI "$URL" | grep -i '^last-modified'
curl -s https://yoursite.com/sitemap.xml | grep -A1 "<loc>$URL</loc>" | grep -o '<lastmod>[^<]*'
```

A healthy answer has the same day in `dateModified` and `<lastmod>`, and either no `last-modified` line or one on that same day. A `last-modified` from this morning on a post you have not touched in weeks means your deploy is stamping it.

## Who can skip this

A site whose header, JSON-LD and sitemap already agree after an edit has nothing to change. A site that sends no `Last-Modified` at all loses nothing here; it only needs the other dates to agree. And if your pages have no JSON-LD and no sitemap, fix those first with C3 and D2; agreement comes after presence.

## Mistakes that make the dates drift again

- Bumping `dateModified` on every build or on a template change. Google counts main content, structured data and links as significant; a footer change is not.
- Generating the sitemap with `new Date()` for every entry.
- Editing a post and forgetting the visible "Updated" line, as we did.
- Fixing the header on the origin while a CDN keeps serving the old one. Check the response a crawler actually gets.

For more on sitemaps, read [how to build a sitemap AI crawlers can use](https://aiscan.site/blog/sitemap-ai-crawlers-can-find) and our [sitemap corpus study](https://aiscan.site/blog/sitemap-reality-corpus-study), which counted `lastmod` on 87 sites but did not compare it with the pages. For the JSON-LD side, see [which schema types matter for AI](https://aiscan.site/blog/json-ld-schema-types-for-ai).

## Next step

[Scan your site with AIScan](https://aiscan.site/) to confirm C3 and D2 pass, run the three-line date test on your newest post, then pick your next fix from the [guides](https://aiscan.site/guides).

