Skip to content

lastmod (sitemap)

An optional `<lastmod>` child element on a sitemap `<url>` entry that tells crawlers when the page last changed -- used to prioritize crawl budget toward genuinely-updated content.

<lastmod> is the freshness signal in sitemap.xml. Each <url> entry can include a <lastmod> child carrying an ISO 8601 date or full timestamp. Crawlers use it to decide which URLs to re-fetch.

Format options (per W3C Datetime Profile):

  • Date only: <lastmod>2026-05-09</lastmod>
  • Date + time: <lastmod>2026-05-09T14:30:00+00:00</lastmod>

Why it matters:

  • Without lastmod, crawlers fall back to crawling everything periodically (typically every few weeks for non-critical content). New or updated pages may not get re-indexed for a long time.
  • With lastmod, crawlers know which URLs to prioritize -- a URL whose lastmod is hours old gets fetched before one whose lastmod is months old.
  • Stale lastmod values across an entire sitemap signal "abandoned site" and crawlers gradually deprioritize the whole domain.

Critical accuracy requirement: lastmod must reflect REAL content change, not deployment time. Updating every URL's lastmod on every deploy (a common bug in static-site generators) trains crawlers to ignore your lastmod entirely. Some big sites have had their lastmod values devalued by Google for exactly this reason -- once burned, the trust takes a long time to rebuild.

Best practice: emit lastmod from your CMS / DB record's updated_at column, not from the build timestamp. If you can't be accurate, omit the tag entirely -- no signal beats wrong signal.

Related terms

Further reading

Send Feedback