Sitemap and URL list crawler

Besides following links, SpiderHead can crawl the URLs a sitemap declares or an explicit URL list, and reconcile what the sitemap says with what the crawl found.

What it does

Sitemap, list and URL-file modes

sitemap-crawl expands one sitemap into a URL tree. It accepts a sitemap URL, or a site root: it then reads the Sitemap lines in robots.txt and falls back to /sitemap.xml. For a crawl, crawl-site --sitemap seeds and reconciles sitemap URLs, --sitemap-only fetches only those members, and --urls or --urls-file fetch an explicit list without following links.

  • Sitemap index, urlset, plain-text and gzip sitemaps
  • Duplicate URLs across sitemaps are reported

Sitemap against crawl

The audit compares the sitemap URL set with the crawled set. It reports redirecting, broken and non-indexable URLs inside the sitemap, and indexable pages missing from it. Response codes for declared URLs come from the crawl, not from sitemap-crawl.

  • Sitemap URLs with no internal links
  • Out-of-sync URL sets

Three steps, one saved scan

  1. Read the sitemap

    Give one sitemap URL. Sitemap indexes, child sitemaps, text lists and gzip files are followed down to the URL entries.

  2. Check each declared URL

    sitemap-crawl reads the sitemap files and reports declared, duplicate and invalid entries. To get a response code for every declared URL, crawl them with crawl-site --sitemap or --sitemap-only.

  3. Compare with the crawl

    The audit sets the sitemap URLs against the pages it crawled and flags what is out of sync.

Checks in this feature

CheckWhat it meansSeverityEvidence
SITEMAP_URL_4XX_5XXA sitemap URL returns a 4xx or 5xx responseCriticalSitemap URL and its status code
SITEMAP_URL_3XXA sitemap URL redirects instead of returning 200ImportantSitemap URL and its redirect status
SITEMAP_URL_NON_INDEXABLEThe sitemap lists a URL that is not indexableImportantSitemap entry
SITEMAP_DESYNCThe sitemap and the crawled URL sets do not matchImportantSitemap set against crawl set
URL_NOT_IN_SITEMAPAn indexable page is missing from the sitemapTipCrawled canonical URL
SITEMAP_STALE_LASTMODThe sitemap has stale or boilerplate lastmod valuesTiplastmod values in the sitemap
Also in the check registry
SITEMAP_URL_NON_CANONICALSITEMAP_ORPHANSITEMAP_URL_DUPLICATEDSITEMAP_TOO_MANY_URLS

One command

bash
spiderhead sitemap-crawl --url https://example.com/sitemap.xml

Install first: installation guide. Every command also runs as an MCP tool for AI agents.

What you need

  • A sitemap URL or a site root
  • For the comparison: a crawl run with --sitemap
  • For a fixed list: a TXT, CSV, XLSX or XML file of URLs

Limits

  • sitemap-crawl reads sitemap files only; it does not request each declared URL
  • Desync and orphan checks need a crawl to compare against
  • Very large sitemaps are capped and the truncation is flagged

Questions

Which sitemap formats does it read?
Sitemap indexes, urlset files, plain-text sitemaps (one URL per line) and gzip files, both .gz files and gzip-encoded responses. Nested indexes are followed to the end.
Can I give it a list of URLs instead of a sitemap?
Yes, in a crawl: crawl-site --urls takes a comma-separated list and --urls-file takes a TXT, CSV, XLSX or XML file, with no link discovery. To add a list to a saved scan, use scan-import-urls, which creates a verified backup first.
Does it change anything on my site?
No. It requests the sitemap files and, in a crawl, the pages you ask for. It does not edit the sitemap or the pages.
Does the sitemap command alone find desync or orphan URLs?
No. Those checks need the crawled URL set, so they run when a crawl is reconciled with the sitemap (crawl-site --sitemap). The command on its own returns the URL tree with lastmod values.

Try it on your own site