LaunchRanked

GlossarySEO

What is lastmod in a sitemap?

Also called: <lastmod>, sitemap lastmod, last modified date

Definition

lastmod is the optional sitemap field that states when a URL's content last changed. Google uses it to schedule recrawls, but only if the dates are consistently accurate.

lastmod, explained

Each <url> entry in an XML sitemap can include <lastmod> in W3C Datetime format, like 2026-09-23 or a full timestamp. Google's sitemap documentation says it ignores <priority> and <changefreq>, but does use <lastmod> if it's consistently and verifiably accurate, for example by comparing it to the last modification of the page.

"Accurate" has a specific meaning. The date should change when the page's main content, structured data or links change significantly. It shouldn't change because the footer's copyright year updated, a sidebar widget changed, or the site was rebuilt. Sites that stamp every URL with the build time on each deploy train Google to ignore their dates, which means genuinely updated pages don't get recrawled any faster.

On a statically generated site, set lastmod from the data that drives the page: the post's updated date in frontmatter, the record's updatedAt in your database, or the date a data file entry was last edited. On programmatic pages, update it only when the page's actual data changes. In a sitemap index, the <lastmod> on each child sitemap should reflect when that file last changed.

Pair honest dates with visible ones. If a page says "Updated September 2026", the sitemap and any dateModified in structured data should agree.

Why it matters for founders

When you refresh pages that already rank, honest lastmod dates help Google notice and recrawl them sooner. On our own product we moved to honest lastmod dates as part of the technical base.

Example

You rewrite the intro and FAQ on 30 comparison pages. Only those 30 entries get a new lastmod. The other 400 keep their old dates, so Google's recrawl focuses on what changed.

Common mistakes

  • Setting every lastmod to the build date.
  • Updating lastmod for trivial template changes.
  • Dates that disagree with the page's visible "updated" date.
  • Spending time on priority and changefreq, which Google ignores.

Sources

Checked

← All 274 glossary terms