Skip to content
Book a call

A sitemap lastmod that always says now is worse than none

· 4-minute read · Measurement and growth · by Direct Softworks

Our sitemap told crawlers that every static page had changed at the moment they asked, every time they asked. That is not freshness. It is a field nobody can believe.

Until August, every static page in our sitemap had changed a moment ago. The homepage, the service pages, the privacy policy, the terms: all eleven static entries carried a lastmod equal to the instant the sitemap was generated. Ask at nine and they had all changed at nine. Ask again at ten and they had all changed again.

Nobody wrote that on purpose. It is what you get when the generator fills the field with new Date(), which is the line most examples show, because it compiles, it validates, and it looks diligent.

It is also the one value that is wrong on every single fetch.

What the field is for

lastmod answers one question for a crawler that already knows a URL: has this page changed since I last fetched it? On a large site with plenty of crawl budget, a wrong answer wastes a few requests. On a small site, where the crawler is handing out a handful of HTML fetches a week, it helps decide which pages get any attention at all.

Google is plain about how it treats the value. Its sitemap documentation says it uses lastmod if the value is consistently and verifiably accurate, for example when compared with the page's actual last modification. The same page says Google ignores priority and changefreq altogether.

Verifiably is the important word. A crawler can check your claim. It fetched the page last week, you say it changed, it fetches it again, and the content is identical. Once that has happened enough times, the rational response is to stop reading your dates.

Why always-now is worse than no date

A sitemap with no lastmod is merely uninformative. The crawler falls back on its own schedule, and nothing is lost.

A sitemap where the date is always now disqualifies itself. It is provably wrong the second time anyone looks, and the damage does not stay on the static pages. Google's wording is about consistency, not about individual entries. Our posts and case studies carried real timestamps from the database, and they sat in the same file as eleven entries that were wrong on every request. A reader of that file has no way to tell which dates are honest, so the reasonable assumption is that none of them are.

That is the part people miss. The cost of a lying field is paid by the entries where it is true.

What we changed

The static pages now share one constant, a fixed date we bump by hand when the copy is genuinely edited. Posts and case studies keep using the timestamps on their own rows.

const STATIC_CONTENT_UPDATED = new Date("2026-09-09T00:00:00Z");

A hand-bumped constant sounds primitive, and it is. It is also more honest than the automatic alternatives. The build time changes on every deploy, including a deploy that only fixes a CSS bug. A file's modification time changes when somebody reformats it. The commit date of a page changes when a shared component it imports changes. None of those means the content a reader sees has changed.

The cost is that a person has to remember, and when they forget, the result is a date that is a little old. That is the right direction to be wrong in. An old date under-claims: the crawler finds the change on its own schedule, which is exactly what would have happened without the field.

Google draws the same line about what counts. The date should reflect a significant change to the content, the structured data or the links, not a new copyright year in the footer.

The timestamps that are only nearly right

Database timestamps feel safe, and mostly they are. Two things are worth checking before you trust one.

What moves updated_at. An ORM that stamps the column on every write stamps it for a typo fix, a category rename and a bulk re-import alike. Our own blog seeding script, when it is told to overwrite existing rows, sets updated_at on every row it touches. A deliberate re-run would tell crawlers that every post changed that day. That is true of the database and false of anything a crawler cares about.

Scheduled content. A post loaded in advance has a row that is older than its page. Our sitemap already refuses to list a post before its publication time, because a crawler that followed the link would get a 404. But once it is listed, the date it reports comes from the row, which can predate the page by weeks. It under-claims, so it does no harm, but the honest value for scheduled content is the later of the two timestamps.

The general rule

A field that is sometimes wrong in a known, harmless direction is still useful. A field that is always wrong is noise, and noise in some entries costs you the credibility of the rest. Prefer an old true date to a fresh false one, and prefer no date to one you cannot defend.

It is the same discipline as dealing with pages Google has discovered and never fetched: on a small site nothing you tell a crawler is free, so the only things worth telling it are the ones it can check and find true.

More notes