How to find broken links and redirects in your sitemap
Your sitemap tells Google "these are my important pages". If it lists pages that return 404, redirect elsewhere or are set to noindex, Google wastes crawl budget and trusts your sitemap less. Search Console reports some of this, but late and only for a sample.
Step 1: validate the file
First make sure the XML itself is valid: correct namespace, absolute URLs, no duplicates, proper lastmod dates. Paste it into our free sitemap validator.
Step 2: request every URL
Each URL in the sitemap should:
- return 200 directly (no redirect),
- not contain
noindexin a meta robots tag or X-Robots-Tag header, - have a canonical tag pointing to itself,
- not be blocked by robots.txt (test it with our robots.txt tester).
For a small site you can check this by hand or with curl: curl -sI https://example.com/page | head -1.
Step 3: automate it for big sites
Our Sitemap URL Validator reads your sitemap (including sitemap indexes), requests every URL and reports status codes, redirects, noindex, canonical mismatches and slow pages. Run it after each deploy or weekly on a schedule. About $2 per 1,000 URLs.
How to fix what you find
- 404/410: remove from the sitemap, or restore the page and redirect old links.
- Redirects: list the final URL instead.
- noindex: either remove noindex or remove the URL from the sitemap; never both list and noindex.
- Canonical to another URL: list the canonical URL only.