SEO · 3 min read

When should a sitemap’s lastmod date change?

Set lastmod from the revision of each canonical page and keep it consistent with visible dates and structured data.

Illustration: retain the publication date and align the material revision across lastmod, dateModified and the visible update date.

Update lastmod when a canonical page receives a significant change. Google names main content, structured data and links as potential examples. It also says an updated copyright year is insufficient. On a static site, read the revision date from the content record rather than the deployment clock.

Use an actual revision in the source data

Imagine an editor adds current limits to a guide and updates the reference link on November 19. The guide now answers a materially different question about eligibility, so record November 19 as its revision date. The same build may change the footer across the site. For the pages where only the copyright year changes, keep the previous dates. If a legacy record lacks a reliable date, leave lastmod out until you have one.

Draw all three date fields from the revision

Keep the original datePublished for a previously published article. Use the meaningful revision date for dateModified and the sitemap entry. If the page shows a reviewed or updated date, make its label and value agree with the meaning of that revision. Each language version should reflect when its substantive change was made. A translation published later may have a different date.

Illustration: retain the publication date and align the material revision across lastmod, dateModified and the visible update date.
Illustration: retain the publication date and align the material revision across lastmod, dateModified and the visible update date.

Preview the diff before shipping

Compare the old XML with the new one using a keyed list of canonical URLs. Check which URLs appeared and which existing dates changed. If every date changed when only one guide changed, trace the generator and replace the build timestamp with the stored revision date. Keep the sitemap limited to the canonical addresses you want searchers to reach.

Official references