XML Sitemap Audit
XML sitemap audit — find and fix the sitemap problems that quietly waste crawl budget and slow indexing.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/sitemap-audit, including the files SKILL.md points to. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit nowork-studio/notfair-plugin/seo/sitemap-audit#main ~/.claude/skills/sitemap-auditFor one project only, change the path to .claude/skills/sitemap-audit. This skill also uses robots.txt — copying SKILL.md alone won't be enough. See the folder on GitHub.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Source of XML Sitemap Audit
Show the full text118 lines
| name | argument-hint | description |
|---|---|---|
| sitemap-audit | <website URL or sitemap URL, e.g. https://example.com or https://example.com/sitemap.xml> | > XML sitemap audit — find and fix the sitemap problems that quietly waste crawl budget and slow indexing. Discovers the sitemap (robots.txt, /sitemap.xml, sitemap index), validates structure and size limits, and cross-checks the URLs it lists against reality: non-200 / redirected / noindex / canonicalized-away URLs that shouldn't be in a sitemap, plus indexable pages that are missing from it. Reviews lastmod accuracy, sitemap-index organization, and robots.txt reference. Use this skill whenever the user asks about sitemaps, sitemap errors in Search Console, "sitemap couldn't fetch / has errors", crawl budget, pages not getting indexed, or whether their sitemap is clean. Trigger on: "sitemap", sitemap.xml", "XML sitemap", "sitemap errors", "sitemap audit", "couldn't fetch sitemap", "crawl budget", "pages not indexed sitemap", "sitemap index", lastmod", "robots.txt sitemap", or any sitemap/crawl-coverage question. For a full-site SEO audit use /seo-analysis; for broken links use /broken-link-checker. |
XML Sitemap Audit
You are a technical-SEO engineer. Your job is to make a site's XML sitemap a clean, trustworthy index of exactly the URLs Google should crawl and index — no more, no less — and to flag everything currently undermining that.
A sitemap full of redirects, 404s, and noindex URLs teaches Google to distrust it and wastes crawl budget. A sitemap missing important pages slows their discovery. Both are common; both are fixable.
Credit: capability inspired by the open-source
claude-seoproject (MIT, Agrici Daniel). Implementation is original to NotFair.
Step 0 — Scope
Collect the site URL ($SITE_URL). If the user gives a direct sitemap URL,
use it; otherwise discover it in Phase 1.
Phase 0 — Preflight & data
Read and follow ../shared/preamble.md for script discovery and GSC auth.
If GSC is connected, pull the Sitemaps report and the Index coverage / Pages report. GSC tells you which sitemaps Google has, their last read status, any errors, and how many submitted URLs are actually indexed — the ground truth this audit reconciles against.
Phase 1 — Discover all sitemaps
- Fetch
robots.txtand read everySitemap:directive. - Fetch
/sitemap.xml,/sitemap_index.xml, and any CMS-specific defaults (WordPress/Rank Math:/sitemap_index.xml; Yoast similar). - If it's a sitemap index, enumerate the child sitemaps and recurse.
Record the full tree: index → child sitemaps → URL counts. Note whether the sitemap is referenced from robots.txt (it should be).
Phase 2 — Structural validation
Check each sitemap file:
- Valid XML, correct namespace, parses without errors.
- Limits: ≤ 50,000 URLs and ≤ 50 MB uncompressed per file. Over either → must split into a sitemap index.
- Absolute URLs, all on the same host/protocol as the sitemap, all HTTPS.
<lastmod>present and in valid W3C date format. Flag sitemaps where every lastmod is identical or set to "today" on every fetch — fake lastmod erodes trust and Google starts ignoring it.<priority>/<changefreq>— note if present, but state plainly that Google largely ignores them (don't recommend effort there).
Phase 3 — URL reality cross-check (the core value)
Sample the listed URLs (all of them if small; a representative sample if large) and fetch each. Every URL in a sitemap should be a canonical, indexable, 200-OK destination. Flag and bucket:
- Non-200 — 404 / 410 / 5xx URLs listed (remove them).
- Redirects (3xx) — sitemap should list the final URL, not the redirect.
- Noindex — pages with
noindexmust not be in the sitemap (contradictory signal). - Canonicalized-away — pages whose
rel=canonicalpoints elsewhere shouldn't be listed; list the canonical instead. - Blocked by robots.txt — disallowed URLs in the sitemap are a conflict.
- Parameter / duplicate URLs that shouldn't be indexed at all.
Then check the inverse — important indexable pages missing from the sitemap (compare against the site's internal links / a crawl / GSC pages list).
Output a bucketed table: URL | issue | recommended action.
Phase 4 — Report
Produce:
- Sitemap Health verdict — clean / needs work, with the count in each bad bucket and total URLs vs. indexable URLs.
- Sitemap tree from Phase 1.
- Remove list (non-200, redirects, noindex, canonicalized-away) and Add list (missing indexable pages).
- Structural fixes (split oversized files, fix lastmod, add robots.txt reference).
- Next step — for WordPress/Rank Math sites, note that most of this is fixed by correcting which post types/taxonomies are included, not by hand-editing XML.
Keep it actionable and falsifiable. Write the report in the user's language.
| 1 | |
| 2 | name sitemap-audit |
| 3 | argument-hint "<website URL or sitemap URL, e.g. https://example.com or https://example.com/sitemap.xml>" |
| 4 | description > |
| 5 | XML sitemap audit — find and fix the sitemap problems that quietly waste crawl |
| 6 | budget and slow indexing. Discovers the sitemap (robots.txt, /sitemap.xml, |
| 7 | sitemap index), validates structure and size limits, and cross-checks the URLs |
| 8 | it lists against reality: non-200 / redirected / noindex / canonicalized-away |
| 9 | URLs that shouldn't be in a sitemap, plus indexable pages that are missing from |
| 10 | it. Reviews lastmod accuracy, sitemap-index organization, and robots.txt |
| 11 | reference. Use this skill whenever the user asks about sitemaps, sitemap errors |
| 12 | in Search Console, "sitemap couldn't fetch / has errors", crawl budget, pages |
| 13 | not getting indexed, or whether their sitemap is clean. Trigger on: "sitemap", |
| 14 | "sitemap.xml", "XML sitemap", "sitemap errors", "sitemap audit", "couldn't |
| 15 | fetch sitemap", "crawl budget", "pages not indexed sitemap", "sitemap index", |
| 16 | "lastmod", "robots.txt sitemap", or any sitemap/crawl-coverage question. For a |
| 17 | full-site SEO audit use /seo-analysis; for broken links use /broken-link-checker. |
| 18 | |
| 19 | |
| 20 | # XML Sitemap Audit |
| 21 | |
| 22 | You are a technical-SEO engineer. Your job is to make a site's XML sitemap a clean, |
| 23 | trustworthy index of exactly the URLs Google should crawl and index — no more, no |
| 24 | less — and to flag everything currently undermining that. |
| 25 | |
| 26 | A sitemap full of redirects, 404s, and noindex URLs teaches Google to distrust it |
| 27 | and wastes crawl budget. A sitemap missing important pages slows their discovery. |
| 28 | Both are common; both are fixable. |
| 29 | |
| 30 | > Credit: capability inspired by the open-source `claude-seo` project |
| 31 | > (MIT, Agrici Daniel). Implementation is original to NotFair. |
| 32 | |
| 33 | |
| 34 | |
| 35 | ## Step 0 — Scope |
| 36 | |
| 37 | Collect the **site URL** (`$SITE_URL`). If the user gives a direct sitemap URL, |
| 38 | use it; otherwise discover it in Phase 1. |
| 39 | |
| 40 | |
| 41 | |
| 42 | ## Phase 0 — Preflight & data |
| 43 | |
| 44 | Read and follow `../shared/preamble.md` for script discovery and GSC auth. |
| 45 | |
| 46 | If GSC is connected, pull the **Sitemaps** report and the **Index coverage** / |
| 47 | Pages report. GSC tells you which sitemaps Google has, their last read status, any |
| 48 | errors, and how many submitted URLs are actually indexed — the ground truth this |
| 49 | audit reconciles against. |
| 50 | |
| 51 | |
| 52 | |
| 53 | ## Phase 1 — Discover all sitemaps |
| 54 | |
| 55 | Fetch `robots.txt` and read every `Sitemap:` directive. |
| 56 | Fetch `/sitemap.xml`, `/sitemap_index.xml`, and any CMS-specific defaults |
| 57 | (WordPress/Rank Math: `/sitemap_index.xml`; Yoast similar). |
| 58 | If it's a **sitemap index**, enumerate the child sitemaps and recurse. |
| 59 | |
| 60 | Record the full tree: index → child sitemaps → URL counts. Note whether the |
| 61 | sitemap is referenced from robots.txt (it should be). |
| 62 | |
| 63 | |
| 64 | |
| 65 | ## Phase 2 — Structural validation |
| 66 | |
| 67 | Check each sitemap file: |
| 68 | |
| 69 | **Valid XML**, correct namespace, parses without errors. |
| 70 | **Limits**: ≤ 50,000 URLs and ≤ 50 MB uncompressed per file. Over either → |
| 71 | must split into a sitemap index. |
| 72 | **Absolute URLs**, all on the same host/protocol as the sitemap, all HTTPS. |
| 73 | **`<lastmod>`** present and in valid W3C date format. Flag sitemaps where every |
| 74 | lastmod is identical or set to "today" on every fetch — fake lastmod erodes |
| 75 | trust and Google starts ignoring it. |
| 76 | `<priority>` / `<changefreq>` — note if present, but state plainly that Google |
| 77 | largely ignores them (don't recommend effort there). |
| 78 | |
| 79 | |
| 80 | |
| 81 | ## Phase 3 — URL reality cross-check (the core value) |
| 82 | |
| 83 | Sample the listed URLs (all of them if small; a representative sample if large) |
| 84 | and fetch each. Every URL in a sitemap should be a **canonical, indexable, 200-OK |
| 85 | destination**. Flag and bucket: |
| 86 | |
| 87 | **Non-200** — 404 / 410 / 5xx URLs listed (remove them). |
| 88 | **Redirects (3xx)** — sitemap should list the final URL, not the redirect. |
| 89 | **Noindex** — pages with `noindex` must not be in the sitemap (contradictory |
| 90 | signal). |
| 91 | **Canonicalized-away** — pages whose `rel=canonical` points elsewhere shouldn't |
| 92 | be listed; list the canonical instead. |
| 93 | **Blocked by robots.txt** — disallowed URLs in the sitemap are a conflict. |
| 94 | **Parameter / duplicate** URLs that shouldn't be indexed at all. |
| 95 | |
| 96 | Then check the **inverse** — important indexable pages **missing** from the |
| 97 | sitemap (compare against the site's internal links / a crawl / GSC pages list). |
| 98 | |
| 99 | Output a bucketed table: URL | issue | recommended action. |
| 100 | |
| 101 | |
| 102 | |
| 103 | ## Phase 4 — Report |
| 104 | |
| 105 | Produce: |
| 106 | |
| 107 | **Sitemap Health verdict** — clean / needs work, with the count in each bad |
| 108 | bucket and total URLs vs. indexable URLs. |
| 109 | **Sitemap tree** from Phase 1. |
| 110 | **Remove list** (non-200, redirects, noindex, canonicalized-away) and |
| 111 | **Add list** (missing indexable pages). |
| 112 | **Structural fixes** (split oversized files, fix lastmod, add robots.txt |
| 113 | reference). |
| 114 | **Next step** — for WordPress/Rank Math sites, note that most of this is fixed |
| 115 | by correcting which post types/taxonomies are included, not by hand-editing XML. |
| 116 | |
| 117 | Keep it actionable and falsifiable. Write the report in the user's language. |
| 118 |
Discussion
Browse more free Claude skills or everything in Marketing.