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
lastmodto the build date. - Updating
lastmodfor trivial template changes. - Dates that disagree with the page's visible "updated" date.
- Spending time on
priorityandchangefreq, which Google ignores.
Sources
Checked
Related terms
- XML sitemapAn XML sitemap is a file that lists the URLs you want search engines to crawl and index, optionally with the date each one last changed. It helps discovery; it doesn't guarantee indexing.
- Sitemap indexA sitemap index is an XML file that lists other sitemap files instead of pages. It lets large sites split URLs across several sitemaps and submit them all through one file.
- Static site generation (SSG)Static site generation (SSG) builds each page's HTML once, at build time, and serves the same file to every visitor. It's the fastest and most reliable way to give crawlers complete pages.
- Article schemaArticle schema is structured data for news, blog and editorial pages, using
Article,NewsArticleorBlogPosting, that tells Google the headline, author, images and publish and update dates.