Why lastmod has to be true

Published

Notes

A sitemap lastmod is a claim about the world: this page changed on this day. Like any claim, it is worth exactly what its accuracy is worth.

The common way to get it wrong looks harmless. A single date is computed when the sitemap module runs, then handed to every route. The code reads cleanly and the sitemap validates. But the framework re-runs that module on every build, so every deploy restamps every page as changed today, whether or not anything changed.

Google uses lastmod only while it stays consistently accurate, and stops trusting it site-wide once a sitemap over-reports. The cost is not a penalty. The cost is that the signal goes quiet exactly when a large site needs it most, because a crawler with limited budget has nothing left to prioritize by.

A date that is honest but months old costs nothing at all. A date that is always today costs the whole signal.

More

Back to the blog index.