Stop Faking lastmod: Why Search Engines Stop Believing Your Sitemap
Open your sitemap and read the dates. If your 2021 post about choosing wool, your returns policy and your contact page all claim they changed at 02:00 this morning, your sitemap is not telling the truth. Nobody did that on purpose. A plugin, a theme or a nightly rebuild did it for you.
That matters because lastmod is the one date in a sitemap that Google says it actually uses, and it only uses it while it can trust it. Below is what the guidance says, how to read the dates in your own sitemap in a few minutes, and a table for deciding whether a change deserves a new date.
Our running example is Purl and Pine, a made-up online wool shop with about 300 product pages and a small blog. Its sitemap plugin was writing the date of the nightly rebuild against every single URL.
What lastmod is supposed to mean
Each URL in an XML sitemap can carry an optional <lastmod> value. The sitemaps.org protocol defines it as the date the page was last modified, and adds a line that most broken setups ignore: the date "must be set to the date the linked page was last modified, not when the sitemap is generated."
So the date belongs to the page, not to the file. If the sitemap is rebuilt every night, that is fine. Copying the rebuild time onto every entry is not.
Google's build and submit a sitemap page goes further. It says Google uses the lastmod value "if it's consistently and verifiably (for example by comparing to the last modification of the page) accurate", and that it should reflect the last significant update. It gives examples: a change to the main content, the structured data or the links on the page is generally significant, while an update to the copyright date is not.
The same page says Google ignores the changefreq and priority tags. Leave them in if your tool adds them, but do not spend time tuning them.
Why a fake date stops working
Google's 2023 announcement, Sitemaps ping endpoint is going away, is best known for retiring the old ping address. The second half of that post is about lastmod, and it is blunt. Google says lastmod is now useful in many cases and is used as a signal for scheduling crawls of URLs it already knows about. Then it warns that if a page changed seven years ago but the sitemap says yesterday, "eventually we're not going to believe you anymore when it comes to the last modified date of your pages."
Notice what that does and does not say. It does not describe a penalty. The likely cost is quieter: your dates stop being treated as a useful hint, so on the day you genuinely change a price or rewrite a guide, the sitemap has no credibility left to point Google at it. The benefit of an honest date is lost precisely when you need it.
If you are still pinging Google with your sitemap, or wondering how to submit it now, our post on sitemap submission after Google's ping retirement covers that side. This post is only about the dates.
Inspect the lastmod dates in your live sitemap
You do not need any special tool for this. Ten minutes is enough.
- Find the sitemap. Try
/sitemap.xmlon your domain first. If that does not work, open/robots.txtand look for a line startingSitemap:. WordPress sites often use/sitemap_index.xmlor/wp-sitemap.xml. - Check whether it is an index. If the file lists other sitemaps rather than pages, it is a sitemap index. Its
lastmodvalues describe when each child sitemap file changed, not when the pages inside it changed, so a recent date there is normal. Open one child sitemap, such as the posts or products file, and carry on with that. - Count the dates. In a browser, view the page source and use Find to search for today's date. Note how many matches you get. The terminal command below does the same job in one go.
- Read the pattern. A healthy sitemap shows a spread of dates, with the newest entries matching the pages you have actually worked on. Warning signs are one date repeated across almost every URL, a time that matches your backup or rebuild schedule, or old pages carrying this week's date.
- Spot-check five pages. Pick a few old URLs, open each page and compare the sitemap date with when someone last edited the content. If you keep a change log, use that. If not, your CMS revision history usually shows it.
- Check the format. The protocol uses W3C Datetime: either a plain date such as
2026-12-01, or a full timestamp with a time zone such as2026-12-01T09:30:00+00:00. Words like "yesterday", empty tags and local date formats such as01/12/2026are wrong. Google's 2023 post says Search Console will tell you if the format is not supported once you submit the sitemap.
If you are happy with a terminal, this lists every lastmod value in a sitemap with a count, most common first. Swap in your own sitemap address:
curl -s https://www.example.com/post-sitemap.xml | grep -o '<lastmod>[^<]*' | sort | uniq -c | sort -rn | head
When Purl and Pine ran step 3, 298 of its 300 product URLs showed the same date and a time of 02:00. The two exceptions were pages added that week. That was the whole diagnosis.
Significant change or not? A decision table
Google's examples cover the main content, structured data, links and the copyright date. The 2023 post adds that an insignificant piece of text in a sidebar or footer does not need a new lastmod. Here is how Purl and Pine applied those examples to the changes it actually makes. The rows beyond Google's own examples are judgement calls, so adjust them to your site.
| Change | Update lastmod? | Reasoning |
|---|---|---|
| Rewrote or added a section of the main text | Yes | Main content is Google's first example of a significant change |
| Changed a price, size range or stock status shown on the page | Yes | It is part of the main content a shopper relies on |
| Added or corrected Product or Article structured data | Yes | Google names structured data as significant |
| Added, removed or fixed links in the body text | Yes | Google names links on the page as significant |
| Swapped the main product photo for a new one | Usually yes | The photo is part of what the page offers |
| Fixed a single typo | Usually no | Treat as insignificant unless it changed the meaning |
| Updated the footer copyright year | No | Google's own example of a change that does not count |
| New sidebar widget, menu item or "latest posts" block | No | Site-wide template text, not this page |
| Added an analytics or chat script | No | Visitors see no new content |
| Rebuilt or re-cached the whole site with no edits | No | Nothing on the page changed |
A quick test helps with the grey areas: would a returning visitor notice the change and find it useful? If not, leave the date alone.
When it is better to leave lastmod out
You do not have to give every URL a date. Google's 2023 post says you can use lastmod for all pages or only for the ones you are confident about. It gives the homepage and category pages as examples: some software cannot easily tell when they last changed because they just gather other pages, and in those cases it is fine to leave lastmod out.
For a small shop, a sensible split is:
- Products, posts and service pages: date them from the content's real edit date.
- Category, tag and archive pages: leave lastmod out unless your software can track their own changes rather than their children's.
- Pages you cannot date reliably at all: leave lastmod out. No date is better than a wrong one.
Fixing a sitemap that stamps today's date
Every platform is different, and plugin behaviour changes between versions, so these are the questions to ask rather than settings to copy.
- Where does the date come from? Look for an option that bases the sitemap date on the post's modified date rather than the build or cache time. If there is no such option, the plugin's support pages or your developer can tell you which field it reads.
- What counts as a modification? Some systems treat any save as a modification, including a plugin updating a hidden field. If yours does, an edit button that resaves every product will reset every date at once.
- Is the template changing every page? If a sidebar or footer block is injected into the stored content, every page looks edited when that block changes. Keep site-wide blocks in the template, outside the page content.
- Can the homepage and archives skip lastmod? If the tool allows it, turn their dates off rather than letting them inherit the build time.
Purl and Pine found its plugin was reading the cache rebuild time. Switching to the post modified date and removing lastmod from category pages was enough. A week later its product sitemap showed a spread of dates going back three years.
Keep your other dates telling the same story
Lastmod is not the only date that can drift. When you make a real change, the visible "Updated" date on the page, the dateModified in any Article markup and the sitemap date should all move together. When you make a trivial one, none of them should move. Our checklist for updating old blog posts covers when an update is worth a new visible date.
If you use IndexNow for Bing, apply the same rule there: submit a URL when its lastmod would change, not on every save. IndexNow for small sites explains the setup.
Checking whether it worked
There is no report that says Google trusts your dates again, and it would be wrong to promise a quick effect. What you can check:
- The sitemap shows a spread of dates, and a page you edit today is the only one carrying today's date.
- The Sitemaps report in Search Console shows the file was read without errors.
- For a page you updated, URL Inspection in Search Console shows the last crawl date. Note it, and see whether later real updates are picked up sooner over the following weeks. Treat that as a loose signal, not proof.
The aim is simple. When your sitemap says a page changed, it really did.
Last reviewed 1 December 2026 against Google Search Central's sitemap documentation, the June 2023 Search Central Blog post on sitemaps ping and lastmod, and the sitemaps.org protocol.