# lastmod

> lastmod is the sitemap tag for a page

Canonical: https://scaplet.com/glossary/lastmod

Glossary Glossary · Crawling and indexing

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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Flastmod%20(%22lastmod%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Flastmod%20(%22lastmod%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Flastmod%20(%22lastmod%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Flastmod%20(%22lastmod%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## 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

_01_At a glance

## What lastmod means, in each place it appears

The tag shows up in two places with two different meanings, and the sitemaps.org protocol keeps them apart. Mixing them up is the usual source of confused sitemap audits.

Location

### `<lastmod>` inside `<url>`

Describes

The date the linked page was last modified

Does not describe

When the [sitemap file](/glossary/xml-sitemap) was generated

Location

### `<lastmod>` inside `<sitemap>` in an index

Describes

When the referenced sitemap file was modified

Does not describe

The time any page listed in that sitemap changed

The index form lets crawlers fetch only sitemaps changed since a given date, which sitemaps.org says helps them find new URLs on large sites. For the file limits and index structure, see the [XML sitemap](/glossary/xml-sitemap) page.

_02_At 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](/glossary/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>
```

**A deploy timestamp on every URL teaches Google to ignore the tag**If every page shows today's date after each build, the value is not verifiably accurate. Google says it uses lastmod only when it is consistently accurate, so the sitewide bump removes the one thing the tag offers.

_03_Your 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](/glossary/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.

_04_How 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](/glossary/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. 01 [Build and submit a sitemap (Google Search Central)](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap) developers.google.com · checked 2026-11-01
2. 02 [Sitemaps XML format (sitemaps.org)](https://www.sitemaps.org/protocol.html) sitemaps.org · checked 2026-11-01

Questions

## Asked a lot.

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

_01_ Do 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.

_02_ Does 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.

## Keep learning

[All glossary](/glossary)

[Learn Google Search Console Crawling and indexing](/glossary/google-search-console) [Related HTTP caching Performance](/glossary/http-caching) [Read next XML sitemap Crawling and indexing](/glossary/xml-sitemap) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Largest Contentful Paint](/glossary/largest-contentful-paint) [Last touch attribution](/glossary/last-touch-attribution) [Lazy loading](/glossary/lazy-loading) [Lead magnet](/glossary/lead-magnet)

More in Crawling and indexing
[Google Indexing API](/glossary/google-indexing-api) [Google Search Console](/glossary/google-search-console) [HTML sitemap](/glossary/html-sitemap) [HTTP status codes](/glossary/http-status-codes) [HTTPS](/glossary/https) [Hydration](/glossary/hydration) [Index bloat](/glossary/index-bloat) [Indexability](/glossary/indexability) [Indexing](/glossary/indexing) [IndexNow](/glossary/indexnow) [Infinite scroll](/glossary/infinite-scroll) [JavaScript SEO](/glossary/javascript-seo) [lastmod](/glossary/lastmod) [Load more button](/glossary/load-more) [Log file analysis](/glossary/log-file-analysis) [Meta refresh](/glossary/meta-refresh) [Nofollow](/glossary/nofollow) [noimageindex](/glossary/noimageindex) [Noindex](/glossary/noindex) [Orphan page](/glossary/orphan-page) [Page indexing report](/glossary/page-indexing-report) [Pagination](/glossary/pagination) [Removals tool (Search Console)](/glossary/removals-tool) [Rendered HTML](/glossary/rendered-html)

Terms on this page
[XML sitemap](/glossary/xml-sitemap) [Entity](/glossary/entity) [Structured data](/glossary/structured-data) [Google Search Console](/glossary/google-search-console)

Free · 2 minutes

## Know the term. _Now check your site._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
