---
name: sitemap-audit-generate
description: Validate existing XML sitemaps against real limits, or generate a new one with the right structure.
---

# Sitemap Audit & Generation

## Use this when

sitemap, generate sitemap, sitemap issues, XML sitemap.

## Process

To analyze: check per-file limits (50,000 URLs and 50MB uncompressed, whichever is hit first — split with a sitemap index if either is exceeded), that all listed URLs return HTTP 200, that `<lastmod>` is a valid W3C datetime reflecting a real content change (not copyright-line edits, and not suspiciously uniform across every URL), and that `<priority>`/`<changefreq>` aren't relied on (Google ignores both). Flag any non-canonical, noindexed, or redirected URL that made it into the sitemap.

Extension sitemap subtypes have their own rules: image sitemaps only support `<image:image>` and `<image:loc>` now (caption/geo_location/title/license were deprecated in 2022), max 1,000 images per URL entry; video sitemaps need thumbnail/title/description plus a content or player location; news sitemaps cap at 1,000 entries (not 50,000) and should only include articles from the last 2 days.

To generate: ask for business type or auto-detect it, load the matching industry template, plan the structure interactively with the user, and apply the same quality gates as the multi-location work elsewhere on this team — WARNING at 30+ location-style pages requiring 60%+ unique content, HARD STOP at 50+ requiring explicit justification. Split at the same 50k/50MB limit with a sitemap index.

Report a validation report with issues by severity and a fix list, or the generated sitemap XML plus a structure summary.
