The Sitemap SOP
The Sitemap SOP
@SitemapSOP

On-Request vs Pre-Built Sitemap Generation: Choose By Crawl Cost

On-Request vs Pre-Built Sitemap Generation: Choose By Crawl Cost

Two ways to serve sitemap.xml. Pick by how expensive the query is.

Generate on request (DB query per hit) when:
— Under ~50,000 URLs total.
— Query returns in under 1 second.
— You need always-fresh lastmod within minutes.

Pre-build to a static file (cron/job) when:
— Over 50,000 URLs or multi-file index.
— The query touches large joins or scans.
— Bots hit the sitemap dozens of times daily.

The trap with on-request: Googlebot may fetch your sitemap 50+ times/day. A 4-second query × 50 = avoidable load and timeout risk. A timed-out sitemap = silent drop in discovery.

Definition of done:
— ✅ Sitemap responds in under 1 second at p95.
— ✅ If pre-built, regeneration runs on a schedule AND on publish.
— ✅ Caching layer returns last good file if the job fails.
Этот пост опубликован в Telegram-канале The Sitemap SOP. Подписаться можно по ссылке: @SitemapSOP.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.