Skip to content

fix(sitemap): pin <lastmod> to deploy time, not request time - #604

Merged
Flotapponnier merged 1 commit into
devfrom
fix/sitemap-stable-lastmod
Jun 21, 2026
Merged

fix(sitemap): pin <lastmod> to deploy time, not request time#604
Flotapponnier merged 1 commit into
devfrom
fix/sitemap-stable-lastmod

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Sitemap runs on force-dynamic. new Date() at module init re-evaluates on every Google crawl, so every URL got a freshly-updated each visit. Google flags lastmod as unreliable sitewide when that happens and stops using it for recrawl prioritisation (confirmed publicly by Gary Illyes).

Fix: inject NEXT_PUBLIC_BUILD_TIME via next.config env at build time, sitemap.ts reads it. Stable per deploy, fresh per deploy. Per-bench still uses bench.lastRunAt (already correct, untouched).

Sitemap runs on force-dynamic (to bypass Next's 2 MB Data Cache limit
on the rendered output), which means `new Date()` at module init
re-evaluates on every Google crawl. Effect: every URL had a freshly
updated <lastmod> each visit, Google flagged the signal as unreliable
sitewide and stopped using lastmod for recrawl prioritisation
(confirmed behaviour, documented by Gary Illyes publicly).
Fix: bake a build-time timestamp via next.config env injection, read
it from process.env.NEXT_PUBLIC_BUILD_TIME in sitemap.ts. Stable per
deploy, fresh per deploy. Per-bench <lastmod> still uses live
bench.lastRunAt as before — that path was already correct.
@Flotapponnier
Flotapponnier merged commit a49d71f into devJun 21, 2026
@Flotapponnier
Flotapponnier deleted the fix/sitemap-stable-lastmod branch June 21, 2026 12:00
Flotapponnier added a commit that referenced this pull request Jun 21, 2026
…#605)
* fix(sitemap): pin <lastmod> to deploy time, not request time (#604)
Sitemap runs on force-dynamic (to bypass Next's 2 MB Data Cache limit
on the rendered output), which means `new Date()` at module init
re-evaluates on every Google crawl. Effect: every URL had a freshly
updated <lastmod> each visit, Google flagged the signal as unreliable
sitewide and stopped using lastmod for recrawl prioritisation
(confirmed behaviour, documented by Gary Illyes publicly).
Fix: bake a build-time timestamp via next.config env injection, read
it from process.env.NEXT_PUBLIC_BUILD_TIME in sitemap.ts. Stable per
deploy, fresh per deploy. Per-bench <lastmod> still uses live
bench.lastRunAt as before — that path was already correct.
* release: hold solana-tx-landing-latency off main
Bench and its dependent /alternatives + /answers pages held off main
while the harness data quality / methodology is iterated on dev.
Matches the existing release-hold pattern (see 12bb8a7). Files stay
on dev untouched; dev to main merges will need to re-delete or skip.
Removed:
- benchmarks/solana-tx-landing-latency.yml
- alternatives/jito.yml (benchmark: solana-tx-landing-latency)
- alternatives/helius.yml (benchmark: solana-tx-landing-latency)
- answers/which-solana-rpc-lands-the-most-transactions.yml
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Flotapponnier