- Priority
- Nice to have Weight 1. Helps agents, rarely decisive on its own.
- Readiness level
- Not a level gate. It counts toward its section score.
- The question
- Can an agent tell from the sitemap what changed and when?
- Runs after
- A1.2. When a dependency fails, this check is skipped rather than guessed.
On this page
In short
A sitemap is the XML file that lists your URLs for crawlers, the programs that build search and AI indexes. Its lastmod date tells them when a page's content last changed, so they can refetch what changed and skip what did not. It only helps when it is present, correctly formatted and honest. This check passes when at least 80 percent of the sitemap entries read carry a valid date and those dates are not all the same.
What this check looks at
In the Sitemaps protocol, each URL entry can carry an optional lastmod element. Its value must be a date in W3C datetime format, for example 2026-10-28 or 2026-10-28T09:14:00+00:00.
The scanner reads the lastmod values of the sitemap entries it fetched during the sitemap check, up to the first 5,000 entries. For each value it asks two questions:
- Is it valid? A full date (
YYYY-MM-DD) is valid. So is a date with a time, as long as the time has a timezone:Zfor UTC or an offset such as+02:00. A time without a timezone, a date in another format, or an impossible date such as month 13 is invalid. - Do the values differ? If every entry shows the same timestamp, the sitemap was almost certainly stamped at the moment it was generated. That value says nothing about when any page changed.
Why it matters for AI agents
AI answers about products are only as current as the index behind them. A price change or a sold-out item that the crawler has not seen yet leads to a wrong answer. Crawlers cannot refetch every page every day, so they rely on hints about what changed.
Bing has said that lastmod is a key signal for how quickly it picks up changes for its AI-powered search experiences. Google documents that it uses lastmod when the value is consistently and verifiably accurate. Both statements point the same way: a truthful lastmod gets changed product pages refreshed sooner, and a fake one teaches crawlers to ignore it.
The check carries weight 1, a nice to have. It is not a level gate. It is cheap to get right, because most platforms already know when a product was last edited.
How the scanner decides
- Pass: at least 80 percent of the entries read carry a valid lastmod, and the values are not all identical.
- Warn: fewer than 80 percent of the entries carry a valid lastmod.
- Warn: enough entries carry a valid lastmod, but every value is the same. A single entry never triggers this, because one date cannot show a pattern.
- Fail: no entry carries a valid lastmod. The report says whether values were missing or present but malformed, and shows a sample of the invalid ones.
- Skip: the sitemap check found no sitemap, or the sitemaps read list no URL entries.
The share is counted over the entries read, so a few pages without a date in a large sitemap do not cost you the pass.
How to fix it
The goal is a lastmod per URL that comes from the content's real modification time. A product that was edited today should show today. A product nobody touched for a year should keep last year's date.
WordPress and WooCommerce
- Yoast SEO and Rank Math write lastmod from each post's modified date, which WooCommerce updates when a product is saved. Enabling one of their sitemaps is usually the quickest fix.
- If you use WordPress core sitemaps, check the live files. Core can add lastmod through the
wp_sitemaps_posts_entryfilter, using the post's modified date. - Stock changes made by an import or sync tool may not update the modified date. If price and stock change outside the editor, check that your sync updates it too.
- Make sure no caching plugin rewrites the sitemap with a single generation timestamp.
Shopify
- Shopify generates its sitemaps, including any lastmod values, and they cannot be edited directly.
- Check the live product sitemap. If every product shows the same date, one possible cause is an app or bulk edit that resaved every product at once.
Any other stack
- Take lastmod from the product's updated-at field in your database, not from the time the sitemap is built.
- Update that field when the visible content changes: title, description, price, availability or images. Do not update it for changes no visitor can see.
- Write dates in W3C format with a timezone, for example
2026-10-28T09:14:00Z. If you only have dates,2026-10-28is valid too. - If you cache the sitemap, cache the whole file with its stored dates rather than regenerating every value on each request.
Verify it yourself
Count the entries and the distinct lastmod values in a sitemap file:
curl -s https://example.com/product-sitemap.xml | grep -o 'lastmod>[0-9][^<]*' | sort | uniq -c | sort -rn | head
curl -s https://example.com/product-sitemap.xml | grep -o 'loc>' | wc -l
The first command shows the most common lastmod values with how often each appears. If one value accounts for almost every entry, that is the generation-time stamp this check warns about. The second command counts the opening and closing location tags, so divide it by two for the number of entries.
Common mistakes
- Stamping every entry with the build time. It looks fresh, but crawlers learn that the value is meaningless and stop trusting it.
- Bumping lastmod on every deploy. A theme change or a cache purge is not a content change.
- A time without a timezone.
2026-10-28T09:14:00is not valid W3C datetime. AddZor an offset, or use the date alone. - Leaving lastmod out entirely. It is optional in the protocol, but without it crawlers have to guess which product pages changed.
FAQ
What format should the sitemap lastmod use?
W3C datetime: either a date such as 2026-10-28, or a date and time with a timezone such as 2026-10-28T09:14:00+00:00. Both are valid. A time without a timezone is not.
Does Google use lastmod?
Google documents that it uses lastmod when the value is consistently and verifiably accurate, for example when it matches the last significant change to the page. It ignores values it cannot trust.
Why does every URL in my sitemap have the same lastmod?
Usually because the sitemap generator writes the current time instead of each page's modified date, or because a bulk import resaved every product at once. The scanner warns in both cases.
Should lastmod change when the price or stock changes?
Yes. Price and availability are visible content that shoppers and agents care about. Updating lastmod when they change helps crawlers refresh the page sooner.
The fix in one step
Give every sitemap entry a lastmod that shows when the page's content last changed, not when the sitemap was generated. Crawlers use it to decide what to refetch, and they ignore it once every entry shows the same timestamp.
<url>
<loc>https://example.com/product/stoneware-mug/</loc>
<lastmod>2026-10-28T09:14:00+00:00</lastmod>
</url>By platform
- WordPress and WooCommerce
- Prefer an SEO plugin's sitemap or the wp_sitemaps_posts_entry filter, which can take lastmod from each post's modified date. Check that product imports and stock syncs update that date.
Prompt for a coding agent
The scanner read this site's sitemaps and found that too few entries carry a valid <lastmod> (under 80 percent, or none), or that every entry carries the same value, which is a timestamp written at generation time. Make the product and page sitemaps emit <lastmod> for each URL from the content's real modification time, in W3C datetime format (`2026-10-28` or `2026-10-28T09:14:00+00:00`, always with a timezone when a time is given). Update that time when visible content changes (title, description, price, availability, images), not on deploys or cache purges. Verify by fetching the product sitemap: a product edited today must show today's date, an untouched product must keep its older date, and the values must differ from one another.
Guides on this topic
Sources and specifications
See how your store does
One scan runs every check in this knowledge base against your site and ends with a prioritised fix list.