SOP: QA a dynamic sitemap generator before launch
For auto-generated sitemaps (Laravel, WP, custom). Test the generator, not one snapshot.
Step 1 — Generate, then assert URL count == count of indexable pages in DB. ✅ Difference is 0.
Step 2 — Confirm the query EXCLUDES: drafts, soft-deleted, noindex, password-protected, and non-200 rows.
Step 3 — ✅ Output is valid XML (passes an XML parser, not just 'looks fine').
Step 4 — ✅ All URLs absolute, https, on the canonical host (no staging domains leaking in).
Step 5 — Add a cache layer but set ✅ TTL ≤ 6h so new content appears same-day.
Step 6 — Add a smoke test in CI: hit /sitemap.xml, assert 200 + valid XML + URL count > 0.
Definition of done: a CI test fails the build if the sitemap returns non-200, invalid XML, or zero URLs.
The Sitemap SOP
@SitemapSOP
SOP: QA a dynamic sitemap generator before launch
Этот пост опубликован в Telegram-канале The Sitemap SOP. Подписаться можно по ссылке: @SitemapSOP.