Sitemap only includes approved listings
Why it matters
A sitemap that leaks pending, rejected, or suspended listings feeds search engines URLs that return 404, soft-404, or thin-content pages, which tanks crawl budget and suppresses ranking for the listings that are actually approved. Worse, indexed-then-removed URLs can surface moderator-rejected content (spam, fraud, or policy violations) in Google results for days before re-crawl, exposing the directory to reputational risk and potential liability under platform-intermediary rules like DSA Article 16 on notice-and-action transparency.
Severity rationale
Medium because the leak is public-facing and wastes crawl budget but does not directly expose user data or credentials.
Remediation
Filter the sitemap query to only approved rows and exclude drafts, pending, rejected, and suspended states at the SQL layer, not in post-processing. Edit app/sitemap.ts so the where clause is explicit:
const listings = await db.listings.findMany({
where: { status: 'approved', published_at: { not: null } },
select: { id: true, updated_at: true }
})
Add a regression test that seeds one row per status and asserts the sitemap length equals the approved count.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the User Submissions & Moderation Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-submissions-moderation·automated