Blog / Technical SEO /

Technical SEO: XML sitemap last-modified dates

Open your XML sitemap and look at the last-modified dates. Are they all… today?

Every single page, updated this morning? Unlikely.

An XML sitemap can include a last-modified date for each URL. If every date changes whenever the sitemap is regenerated, the field stops helping crawlers tell genuinely updated pages from routine system activity. It’s a small field, but you want it to tell the truth.

Key takeaways

  • Use last-modified dates to reflect meaningful page changes.
  • Avoid updating every URL’s timestamp on every sitemap build.
  • Check the sitemap against the actual page and canonical URL.

What the date is for

A lastmod value tells a crawler when the page’s content last meaningfully changed. It’s a hint, not an instruction to crawl or rank the page. A fresh timestamp doesn’t mean the page deserves a new crawl if the content hasn’t changed.

Some CMSs and sitemap tools set the field automatically. Check what they count as an update. Editing a product description, changing stock, updating a template or simply rebuilding the sitemap may all behave differently.

Keep the signal honest

Use a consistent timestamp format and time zone. Update the value when the page changes in a way that matters to its content or purpose. A small automated stock refresh may not make the whole page newly revised. Decide based on how the store’s data and pages actually work.

If you can’t provide a reliable last-modified date, leaving it out beats publishing a misleading one. Don’t bump all the timestamps by hand to encourage crawling. Put that energy into making the page useful and well linked internally.

Validate the sitemap

Open the XML and check a few representative URLs against their live pages. Confirm the sitemap lists canonical, indexable URLs and that the dates look plausible. After a platform or plugin change, compare timestamps for pages that did and didn’t change.

Choose a product or article updated recently. Does its sitemap date reflect the actual edit, or just the last sitemap build?

Avoid noisy timestamps

A sitemap generator may rewrite every lastmod value each time it rebuilds the XML, even when the pages didn’t change. That makes the dates far less useful. Find out what event updates the timestamp in your CMS or plugin. Then compare a page that changed with one that didn’t. If both get the same new date, the system is probably reporting a build time, not a page update.

Don’t edit dates just to encourage crawling. A sitemap is a discovery and update signal, not a promise that a crawler will visit straight away. Make changed pages reachable through internal links, and make sure the sitemap lists the preferred, indexable URLs.

On a large site, sample different templates and content types. A product price change may or may not be a meaningful page update, depending on how the product is presented. Just decide consistently. Document the rule, and revisit it if the publishing system changes.

Define what counts as a meaningful update

A page can change without its purpose changing. A template might add a footer date, stock might refresh from a feed or a layout component might be rebuilt. Decide which changes should update lastmod based on the information a visitor actually gets. There’s no value in claiming editorial freshness when the meaningful content hasn’t moved.

Keep the rule consistent across content types. An article edit, a product specification correction and a navigation redesign may all carry different weight. Document how the system behaves so editors know whether the timestamp is automatic and what triggers it. If the CMS can’t reliably express a meaningful update, consider leaving the date out.

When auditing the sitemap, compare a few known edits with their dates, plus a few untouched pages. Check format and time zone consistency, then inspect the canonical URL and response. That small sample shows whether the sitemap describes page changes or just records when a file was generated. It’s a ten-minute check, and I’d make it part of any technical audit.

Watch for unintended page-level changes

Sitemap timestamps should reflect the page, not an unrelated system event. A global theme update can change the rendered HTML of every URL even though the editorial content stayed the same. Decide whether your definition of a meaningful update includes that kind of structural change, and apply it consistently. Don’t use sitemap dates to carry information they weren’t designed for.

An inventory feed can change constantly. If every stock refresh updates lastmod, the sitemap reports nonstop edits even when the description and purpose haven’t changed. If availability is central to the page, the business may still treat it as meaningful. What matters is making that decision explicit, and not claiming editorial revision when there wasn’t any.

When a page moves or is substantially rewritten, make sure the sitemap timestamp, canonical, internal links and redirect behaviour all agree with the new state. Note the content change and its source in the CMS or editorial process. I’d rather leave a date alone than fake it to look fresh. A proper record beats an XML date standing in as the page’s only history.

If the site publishes through several systems, check which one controls the sitemap. A cache, proxy or SEO plugin may serve a generated file that isn’t rebuilt straight after an edit. Check the public XML, not just the CMS preview. If a deployment changes sitemap generation, add a timestamp spot-check to the release review so you catch the change before the next reporting cycle. Why not open your sitemap right now and compare three dates with what you know actually changed?