Sitemap lastmod: how Google uses it and how to get it right
The <lastmod> tag in an XML sitemap tells search engines when a URL's content last changed. Google uses sitemap lastmod values to decide what to recrawl, but only when they are consistently and verifiably accurate, and it ignores <changefreq> and <priority> altogether. A lastmod that is wrong across the site is about as useful as none.
It is one of the few sitemap fields still worth the effort, and one of the easiest to break unnoticed.
What lastmod is for
A sitemap entry with a lastmod looks like this:
<url>
<loc>https://example.com/guides/pricing/</loc>
<lastmod>2026-09-28</lastmod>
</url>
The tag is optional in the sitemaps.org protocol. Its job is prioritisation. On a site with thousands of URLs Googlebot can't recrawl everything every day, and a reliable date points it at the pages that actually changed.
Google is specific about what counts as a modification: a significant change to the main content, the structured data or the links on the page. A new copyright year in the footer doesn't count. Lastmod should follow content edits, not every regeneration of the HTML.
Google's position on lastmod, changefreq and priority
Google's sitemap documentation says it uses lastmod if the value is consistently and verifiably accurate, for example when it matches the page's last modification as Google sees it. The same page states that Google ignores <changefreq> and <priority>. Many generators still output both: harmless, but tuning them is wasted time.
"Consistently" is the word that matters. If Google sees your dates change without the content changing, it can stop relying on them, including for the URLs where the date is right.
The format: W3C Datetime
Lastmod uses the W3C Datetime format. Both of these are valid:
2026-09-28
2026-09-28T14:30:00+01:00
A plain date is enough for most sites. If you add a time, you need a timezone designator too, either Z for UTC or an offset such as +01:00. 2026-09-28T14:30:00 with no offset isn't valid W3C Datetime, and neither is 28/09/2026 or a date string copied straight out of a database.
Common lastmod mistakes
The most frequent is lastmod set to build time. Static site generators and some sitemap plugins stamp every URL with the moment the sitemap was generated, so after each deploy every page claims to have changed today. That is the inconsistency that teaches Google to ignore the field.
A variant comes from dynamic sitemaps that print the current time on every request.
The opposite problem is a lastmod that never moves. A plugin that stopped running, or a CMS that writes the publication date instead of the modified date, leaves edited pages looking untouched.
Timezones cause subtler trouble: local time written without an offset shifts dates by hours, and dates in the future usually point to a clock or timezone bug.
In a sitemap index, each child's <lastmod> should change only when that file changes. The XML sitemap best practices guide covers the rest of the structure.
How to check your lastmod values
Open the sitemap and scan the dates. If every URL shares one value, you have the build-time problem. A quick way to count:
curl -s https://example.com/sitemap.xml | grep -o '<lastmod>[^<]*' | sort | uniq -c | sort -rn | head
One date with a count close to the total number of URLs is a red flag. Then check a few pages you know were edited recently, and one old page nobody has touched. Fetch the sitemap again a few hours later: if dates changed and nobody published anything, the generator is using the current time.
Search Console's Sitemaps report shows when Google last read each sitemap and how many URLs it found, but not whether it trusts your dates.
Tracking lastmod changes over time
A one-off check shows today's state. The more useful signal is which URLs got a new lastmod after a release, and whether that matches what was edited.
Deltio takes a snapshot of each monitored sitemap once a day, nested sitemap indexes included, and flags URLs added, URLs removed and lastmod values that changed. It keeps the last 7 snapshots with a diff between them. After a deploy you can see whether every URL's lastmod jumped at once, or whether a page you updated never got a new date. It doesn't validate the date format or tell you how Google weighs your dates. For the wider routine, see how to monitor sitemap changes.
Plans start at £24 a month (£20 billed annually), with a 14-day free trial.
Frequently asked questions
- Should lastmod include the time or just the date?
- A date is enough for most sites. If pages change several times a day, as on a news site, include the time with a timezone designator such as Z or +01:00. A time without a timezone is not valid W3C Datetime.
- Does updating lastmod make Google recrawl a page faster?
- It can help Google prioritise the page, provided Google trusts your dates. It is a hint, not an instruction. Changing the date without changing the content won't get you a faster crawl and can make Google rely less on your sitemap.
- Is it better to leave lastmod out than to get it wrong?
- The tag is optional, and Google can crawl a site without it. If your CMS can't produce dates that reflect real content changes, leaving the field out is a reasonable choice. Accurate lastmod is most useful on large or frequently updated sites.
- Can I still ping Google when my sitemap changes?
- No. Google deprecated its sitemap ping endpoint in 2023. Its recommendation is to keep lastmod accurate and to submit the sitemap through Search Console or reference it in robots.txt.
- Does Deltio alert me when lastmod values change?
- Yes. Deltio's daily sitemap snapshot detects URLs added, URLs removed and lastmod changes, including in nested sitemap indexes, and keeps the last 7 snapshots with a diff. Alerts go by email or Slack, and you can switch each event type on or off.