What is lastmod?

<lastmod> is the element in an XML sitemap that says when a page last changed in a meaningful way. Crawlers compare it with the date of their last visit to decide whether a URL is worth fetching again. Google uses the value only when it proves to be consistently accurate.

Of the three optional sitemap tags, it is the one that still does something. Google ignores <changefreq> and <priority>.

Format

xml
<url>
  <loc>https://example.com/guides/brewing/</loc>
  <lastmod>2026-11-03T09:12:00+00:00</lastmod>
</url>

The value uses W3C Datetime format. A plain date, 2026-11-03, is valid, and so is a full timestamp with a time zone offset. A timestamp without an offset is not. The tag is also allowed on each <sitemap> entry in a sitemap index, where it tells crawlers which child sitemaps contain changes.

What counts as a modification

Google's guidance is that the date should reflect the last significant change to the page: the main content, the structured data, or the links. Updating the copyright year in the footer or tweaking a sidebar does not qualify.

That is a description of intent. What matters in practice is that the dates are believable. If every URL in a sitemap carries today's date, or a date that changes on every request, the signal is useless and Google learns to disregard it for the site. A trusted value, on the other hand, lets Google pick up edits sooner without recrawling everything.

Ways lastmod goes wrong

  • Generated at request time. A sitemap script that writes the current time for every URL.
  • Bulk updates. A database migration or plugin touches every post's modified date, and the whole site appears freshly edited.
  • Future dates, usually from a time zone error.
  • Invalid formats such as 03/11/2026 or a timestamp without an offset, which validators and crawlers reject.
  • Dates used as a trick. Bumping the date without changing content does not improve rankings and wears out the signal.

Run a sitemap through our XML sitemap validator to catch format problems.

lastmod and the date shown in results

The sitemap value is a crawl-scheduling hint. The date Google may show next to a result is worked out separately, from the visible date on the page and from datePublished and dateModified in Article structured data. Keep all three honest and in agreement: sitemap, visible date and markup.

In WordPress

WordPress stores a modified time for every post, and sitemap generators read it. The core sitemap at /wp-sitemap.xml includes lastmod for posts and pages from the post's modified date in GMT. Hydrogen SEO's XML sitemaps give each entry a lastmod in UTC, and for a category or tag archive use the date of the newest post in it, since an archive changes when its contents do.

The modified date moves whenever a post is saved, including for a one-character fix. That is usually acceptable. Where it becomes a problem is scripted bulk edits, so run those with care and expect crawlers to revisit everything afterwards. To announce a change immediately instead of waiting for the next sitemap fetch, engines that support IndexNow accept a direct ping.

Common questions

Is lastmod required in a sitemap?

No. Only the loc element is required. lastmod is optional but worth including when your system can supply accurate dates.

Does changing lastmod make Google recrawl a page?

It can prompt a recrawl when Google trusts your dates. It is a hint, not a command, and it has no effect on ranking by itself.

Does Google use changefreq and priority?

No. Google ignores both elements. Of the optional sitemap tags it only uses lastmod, and only when the values are consistently accurate.