Contact

What is Lastmod?

Definition

Lastmod is an optional element in an XML sitemap that states, in W3C Datetime format, when a URL's content last changed in a meaningful way. Google uses it as a signal when scheduling recrawls of URLs it has already discovered, but only if the values are consistently and verifiably accurate. Dates that do not reflect reality are eventually disregarded.

Also known as: lastmod tag, last modified date, sitemap lastmod

Sitemap table whose lastmod dates tell the crawler to revisit recently changed pages sooner than pages that have not changed

Format

<lastmod> sits inside each <url> entry of an XML sitemap and follows the W3C Datetime format. A plain date or a full timestamp with a time zone offset both work:

<url>
  <loc>https://example.com/blog/technical-seo-guide/</loc>
  <lastmod>2026-09-28</lastmod>
</url>
<url>
  <loc>https://example.com/products/running-shoe/</loc>
  <lastmod>2026-10-02T14:20:00+03:00</lastmod>
</url>

Locale-style dates such as 10/02/2026, or timestamps without a time zone, are invalid. Search Console flags an unsupported format once you submit the sitemap.

How Google uses it

In a 2023 post, Google said lastmod had become genuinely useful on many sites and that it uses the value as a signal for scheduling crawls of previously discovered URLs. The condition was explicit: the value has to match reality consistently. A site that claims a page changed yesterday when it really changed seven years ago will eventually stop being believed. Google's sitemap documentation states the same rule: it uses lastmod if it is consistently and verifiably accurate, and it ignores changefreq and priority altogether.

You don't have to include lastmod for every URL. If your system can't reliably tell when an aggregating page such as the homepage or a category last changed, Google is fine with you leaving the element out for those pages.

Which edits deserve a new date

Update the dateLeave it alone
Main text rewritten or expandedA line in the footer or sidebar changed
Structured data added or changedThe copyright year rolled over
Links on the page updatedA view counter or "related posts" block refreshed
A product's price, stock or specs changedThe site was rebuilt or redeployed

In Google's words, "last modification" really means "last significant modification".

Habits that destroy trust

  • Writing the sitemap generation time. The sitemaps.org protocol rules this out explicitly: the date must reflect when the page changed, not when the sitemap was built.
  • One date for every URL. Thousands of pages apparently modified in the same minute show the value is stamped automatically.
  • Build timestamps. Static site generators that refresh every date on each build.
  • Conflicting dates. The sitemap's lastmod, the "updated" date visible on the page and dateModified in the Article schema all disagree.

Other date signals with similar names

Don't confuse lastmod with the Last-Modified HTTP response header. That header powers conditional requests: a browser or bot asks with If-Modified-Since, and if nothing changed the server replies with a bodiless 304 Not Modified. Google's crawlers support this mechanism, though Google recommends ETag because it avoids date formatting problems. Lastmod, by contrast, is a declaration: a hint about when a bot should come back.

If you want to announce changes as they happen, push protocols such as IndexNow complement lastmod for the search engines that support them. Source: Google's post on sitemap pings and lastmod.

Related terms

← Back to the glossary