Free auditStart free
GlossaryGlossary · Crawling and indexing

lastmod

lastmod is the sitemap tag for a page's last modified date. The W3C Datetime format, what counts as a real change, the sitemap index meaning and how to audit it.

2 min
read
2
sources
Nov 1, 2026
updated
Scaplet Editorial Team
author
In one line

lastmod is an optional sitemap tag giving the date a page was last modified, in W3C Datetime format. Google uses it only when it is consistently and verifiably accurate, and counts significant changes to main content, structured data or links, not a copyright-year edit. In a sitemap index it describes the sitemap file, not the pages.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
No, optional
Required
W3C Datetime, `YYYY-MM-DD` is valid
Format
Used only when consistently and verifiably accurate
Google's rule
`changefreq` and `priority`
Ignored by Google
02At a glance

Anatomy of a correct entry

Part

Value format

Rule
W3C Datetime. sitemaps.org says the time portion can be omitted, so YYYY-MM-DD is valid
Part

Source of the date

Rule
The page's real last modification, not the build or sitemap generation time
Part

Accuracy

Rule
Google may check values against the page's actual last modification and does not trust inaccurate ones
Part

Escaping

Rule
Google says all tag values must be entity escaped in the XML file
Page entry and index entry
<!-- sitemap-pages.xml -->
<url>
  <loc>https://example.com/guides/canonical-urls</loc>
  <lastmod>2026-10-14</lastmod>
</url>

<!-- sitemap-index.xml -->
<sitemap>
  <loc>https://example.com/sitemap-pages.xml</loc>
  <lastmod>2026-10-14T08:30:00+00:00</lastmod>
</sitemap>
03Your call

What counts as a real change

If this fits

Update lastmod when

  • The main content of the page changes in a meaningful way
  • Structured data on the page changes
  • Links on the page change
Or

Do not update it for

  • A copyright date change, which Google says is not significant
  • A site-wide template or build tweak that leaves page content as it was
  • Reordering or touching a file without changing what the page says

Google ignores <priority> and <changefreq>, so lastmod is the one optional freshness field it reads. Time spent on the other two is wasted.

04How it works

Check it in 2 minutes

Do all dates look the same?
curl -s https://example.com/sitemap.xml \
  | grep -o '<lastmod>[^<]*</lastmod>' \
  | sort | uniq -c | sort -rn | head
# One date with thousands of hits means lastmod is a build timestamp
  1. 01

    Spot the pattern

    Run the command. A handful of dates across many URLs means real edits. One date repeated everywhere means it tracks deploys.

  2. 02

    Compare with a page

    Pick a URL, check its last real content edit in your CMS or Git history, and compare it with the sitemap value.

  3. 03

    Fix the source

    Generate the date from the content's modified field, and leave the tag out where you have no reliable date. It is optional.

  4. 04

    Resubmit and monitor

    Submit the sitemap in Google Search Console and review it there.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • google.com
  • sitemaps.org
  1. 01Build and submit a sitemap (Google Search Central)developers.google.com · checked 2026-11-01
  2. 02Sitemaps XML format (sitemaps.org)sitemaps.org · checked 2026-11-01
Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Do I need lastmod in my sitemap?

No. It is optional. If you cannot supply a date that tracks real content changes, leave it out rather than send values Google may not trust.

02Does lastmod include a time?

It can. sitemaps.org specifies W3C Datetime, which permits a date alone such as 2026-10-14 or a full timestamp with a time zone. Google's examples use the date-only form.

Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly