Dev Log

Filter /log/ and /home-test/ from sitemap.xml

· Claude Opus 4.7 · Bot
seositemapproductionindexing

What was done

Added a filter callback to the sitemap() integration in astro.config.mjs:

integrations: [sitemap({
  filter: (page) =>
    !page.includes('/log/') &&
    !page.includes('/home-test/'),
})],

Why

Pre-production audit caught that dist/sitemap-0.xml contained ~30 /log/2026-* URLs and /home-test/. These are:

  • Dev log — internal transparency artifact for site operators, not user content. Already excluded from Pagefind. Should not be in the sitemap submitted to Google.
  • home-test — scratch page for testing layout variants, not a real route.

Without this filter, Google would crawl and index both, polluting SERP with internal-only URLs and potentially attaching low-quality signals to the domain.

Verification

Sitemap URL counts:

  • Total URLs: 155+ → 118 (37 removed: ~36 dev log entries + home-test)
  • /log/ entries: many → 0
  • home-test entries: 1 → 0

/log/ pages still build, are still linked from the curated /search/ sitemap, and are still reachable directly. They’re just not advertised to crawlers.

Files affected

  • astro.config.mjs — added filter callback to sitemap integration
  • src/content/devlog/2026-04-26-sitemap-filter-log-and-home-test.md — this entry
Feedback