SEO August 17, 2026 · 8 min read · Written by the InfiniUm Tools team

XML Sitemap Validation: How to Check and Fix Sitemap Errors

Quick answer: Validate a sitemap by checking it's reachable at a 200 status, the XML is well-formed, and every URL it lists also returns 200 and matches its own canonical tag. The most common reason pages don't get indexed despite being in the sitemap is a mismatch — a URL listed in the sitemap that 404s, redirects, or canonicalizes somewhere else.

A sitemap doesn't force Google to index your pages — it's a hint, not a guarantee. But a broken sitemap actively works against you: it wastes crawl budget on dead URLs and sends Google contradictory signals about which pages actually matter. This guide covers what "valid" actually means and how to check it.

What a valid sitemap actually requires

A sitemap can be technically well-formed XML and still be functionally broken for SEO purposes. Validation has two layers:

  • Structural validity — correct XML syntax, proper namespace declaration, no malformed tags
  • Content validity — every URL listed actually resolves correctly and is meant to be indexed

Most sitemap generators handle structural validity automatically. Content validity is where sitemaps quietly rot over time — pages get deleted, redirected, or noindexed, but stay listed in the sitemap.

🗺️
Validate your sitemap instantly
Checks every URL in your sitemap for broken links, redirects, and canonical mismatches — free, no account needed.
Validate your sitemap →

Common sitemap errors that block indexing

URLs returning 404

Pages get deleted or moved, but if the sitemap generator only runs once and isn't kept in sync, old URLs linger. Each 404 in a sitemap is a small trust signal against the whole file — Google's crawler learns your sitemap isn't reliable.

URLs that redirect instead of resolving

A sitemap should only ever list the final destination URL, never a URL that 301s or 302s somewhere else. If a page moved, update the sitemap to point directly at the new URL rather than relying on the redirect.

Canonical mismatches

If a URL is listed in the sitemap but its own <link rel="canonical"> tag points somewhere else, you're sending Google two different opinions about which URL is authoritative. The sitemap should only ever contain canonical URLs.

Noindex pages included in the sitemap

Including a page marked noindex in your sitemap is a direct contradiction — you're asking Google to crawl a page you've told it not to index. Filter these out at generation time.

Sitemap not reachable or wrong content type

The sitemap URL itself needs to return a 200 status with an XML or gzipped-XML content type. A sitemap behind a login wall, blocked by robots.txt, or served as HTML instead of XML won't be read at all.

How to check your sitemap manually

# Confirm the sitemap itself is reachable
curl -I https://yourdomain.com/sitemap.xml

# Should return: HTTP/1.1 200 OK
# Content-Type: application/xml (or text/xml)

From there, checking every individual URL by hand doesn't scale past a handful of pages — for anything larger, an automated check that crawls the whole sitemap and reports status codes per URL is the practical approach.

Check your entire sitemap at once

Rather than checking URLs one by one, InfiniUm's Sitemap Validator reads your sitemap.xml, checks every listed URL's status code, flags redirects and 404s, and confirms canonical consistency — all in one pass.

🗺️
Free Sitemap Validator
Find every broken URL, redirect, and canonical mismatch in your sitemap — no account needed.
Check your sitemap →

Sitemap best practices

  • Keep sitemaps under 50,000 URLs and 50MB uncompressed — split into multiple files with a sitemap index if you exceed this
  • Only include canonical, indexable, 200-status URLs
  • Update <lastmod> accurately — it helps Google prioritize recrawling changed pages, but a dishonest lastmod (updated on every build regardless of actual changes) trains Google to ignore it
  • Submit the sitemap URL in both Google Search Console and Bing Webmaster Tools
  • Re-check after any major site restructure, migration, or bulk content deletion

What healthy indexing looks like after fixing your sitemap

Once your sitemap only lists clean, canonical, 200-status URLs, check the Coverage report in Search Console. You should see the "Submitted and indexed" count climb toward matching your total submitted URLs, with "Excluded" reasons dropping to legitimate exclusions (like intentionally noindexed pages) rather than errors.

Frequently Asked Questions