Sitemap lastmod: report real content changes accurately
Fix sitemap lastmod timestamps with content-aware publishing dates, dependency tracking and verification that separates a rebuild from a meaningful update.
By Crawlito · 5 min read
In short
- A build timestamp is not automatically the date a page last changed in a meaningful way.
- Derive lastmod from the published content and significant dependencies, not every database write.
- If you cannot produce a reliable modification date, omitting the optional value is better than inventing one.
On this page
- Define meaningful change for your content model
- Trace where the current timestamp comes from
- Model significant dependencies explicitly
- Keep public dates consistent without conflating them
- Test unchanged and changed pages together
- Use freshness as maintenance evidence, not a promise
- Frequently asked questions
A sitemap's lastmod value should describe a meaningful change to the public page, not the time the sitemap happened to be generated. Build it from reliable publishing data and verify that the corresponding content is live. If the system cannot produce an honest date, leave the optional field out until it can.
This matters most when a site rebuilds frequently. Assigning today's date to every URL can make unchanged archives look newly revised, while a real update to a pricing table may go unreported if its dependency lives outside the article record.
Define meaningful change for your content model
Start with the reader's experience. A corrected technical instruction, a revised product specification or an updated link to a replacement resource can change what the page communicates. A database maintenance timestamp or a routine deployment may not.
At the time of writing, Google's sitemap guidance says it uses lastmod when the value is consistently accurate and reflects significant page updates. Its examples include main content, structured data and links, while a copyright-date change is not significant. That is the source-backed rule; your engineering task is mapping it to the site's publishing model.
Write a short policy with examples your editors recognize. For a documentation site, supported software versions may be significant. For a catalog, product availability or specifications may matter. The decision should be tied to the public page rather than a generic “row updated” event.
Do not use the field to imply freshness that the article does not have. An old guide with a newly generated date is still an old guide if nobody reviewed its instructions.
Trace where the current timestamp comes from
Inspect the sitemap generator and identify the source of each date. Common sources include CMS modification time, Git history, a published revision record, file modification time and the current build clock. They have different meanings.
A comparison table makes the risk visible:
| Timestamp source | What can go wrong |
|---|---|
| Current build time | Every page appears changed on every deployment |
| File modification time | Checkout or packaging changes the filesystem date |
| Any database update | Administrative changes look like editorial revisions |
| Published revision time | Good candidate if publication semantics are reliable |
| Dependency change time | Useful only when the dependency affects this page |
Do not replace the source until you understand the existing publication flow. A CMS may update a record while leaving the public revision unchanged. Conversely, a shared product record can alter several pages without touching their article timestamps.
Use the broader XML sitemap guide for format and inventory checks. Here the focus is the meaning of the modification date attached to each URL.
Model significant dependencies explicitly
A page can depend on more than one record. Consider an installation guide that includes a supported-version table generated from product data. If that table changes, the public guide changes even if its Markdown body stays untouched.
List dependencies that materially affect the page: article content, product facts, maintained comparison data, relevant structured data and important links. Avoid including every shared asset automatically. A logo compression change is not necessarily an editorial revision to every article.
An illustrative policy is:
page lastmod = latest published significant change among:
- the article revision
- its embedded compatibility table
- its reviewed product-specific noticesThis is a design sketch, not a universal formula. The right set depends on how the page is assembled. Keep the dependency graph small enough to explain and test.
When a global change truly affects all pages, record it honestly. The aim is not to minimize modification dates; it is to represent meaningful public changes accurately. A site-wide legal or factual correction may legitimately require broad updates, while a new deployment identifier does not.
Keep public dates consistent without conflating them
Publication date, last substantive update and last editorial review are different facts. A page can be reviewed and found accurate without changing, or updated to fix a broken reference without becoming a newly published article.
Choose labels that tell readers what occurred. Do not reset the original publication date every time an editor saves the page. If you display a review date, make sure it reflects an actual review process with an owner.
Check structured data and visible dates alongside sitemap output. They do not need to represent the same event if clearly labeled, but they should not contradict the publishing history. The Article schema guide provides context for article metadata.
Use one reliable time source for the publication event and preserve timezone information where needed. A timestamp near midnight can appear as a different calendar date in another timezone; that is not inherently an error, but inconsistent conversion logic can make dates confusing.
Test unchanged and changed pages together
A good verification set contains at least one unchanged page and one intentionally updated page. Generate the sitemap before and after the release. The updated page should receive the appropriate date, while the unchanged page should not change merely because the build ran.
Also test a dependency-only update. Change a fixture's compatibility table or another approved significant dependency and verify that the affected page date changes without touching unrelated pages. This catches both missed updates and overly broad invalidation.
Compare public output after deployment, not only a local XML file. A cached sitemap can retain old values while pages have updated, or a fresh sitemap can advertise changes before the new content is available. Coordinate publication so the dates describe the public state.
Inspect actual content evidence for a small sample. A diff, CMS revision or release note should explain why the date changed. If nobody can identify the public difference, investigate the timestamp source instead of assuming the sitemap is correct because it parses.
Use freshness as maintenance evidence, not a promise
Accurate dates help describe the site, but they are not a substitute for useful content or accessible pages. A crawler may still decide when and whether to revisit a URL. Do not present a lastmod repair as a way to increase traffic.
Tie the work to a broader maintenance process. When an important guide changes, verify its facts, links and delivery. The AI search readiness checklist helps keep the technical checks connected to the actual page.
Review the timestamp policy after CMS migrations, repository moves and build-system changes. Those can silently change what “modified” means. Keep a small regression fixture so the difference is noticed before every URL suddenly acquires the same new date.
If reliable historical dates are missing, do not fabricate a reconstruction. Use known publication records where available, document uncertainty internally and omit unsupported optional values. Starting with truthful metadata today is better than assigning precise-looking dates without evidence.
Frequently asked questions
Should lastmod equal the deployment time?
Only if that time accurately represents a significant public change to the specific page. A routine rebuild of unchanged content should not update every URL's modification date.
What if a shared table changes on several pages?
If it materially changes those pages, include that dependency in the modification policy. Verify the affected pages and avoid updating unrelated URLs merely because they share the same build.
Is it acceptable to omit lastmod?
Yes, it is optional in the sitemap protocol. An omitted value is preferable to an invented or systematically misleading date.
Should an editorial review reset the article's publication date?
No. Keep publication, review and substantive update events distinct. Label public dates according to what actually happened.
Use the free check on an updated page and compare its live content with the sitemap's modification record.
Filed under Structure and schema. Topics: sitemaps, content-freshness, technical-seo