SITEMAP GUIDE

Common XML sitemap errors

A useful XML sitemap should primarily contain the URLs you want search engines to discover as preferred, indexable pages. A sitemap can be valid XML and still contain poor URL choices.

Quick check: redirects, broken pages, noindex URLs and pages canonicalizing elsewhere are all worth reviewing when they appear in a sitemap.

Redirecting URLs

If a sitemap URL immediately redirects, the final destination is usually the more useful sitemap entry. Keeping old redirecting URLs creates unnecessary crawl steps.

404 and 410 URLs

Deleted URLs normally should not remain in an active sitemap unless the page is about to be restored. Remove stale entries at the sitemap source rather than repeatedly editing generated XML by hand.

Noindex URLs

A noindex page in a sitemap sends mixed intent: the sitemap presents the URL for discovery while the page asks not to be indexed. Confirm which behavior is intended.

Canonical conflicts

If URL A appears in the sitemap but declares URL B as canonical, review which page is actually preferred. Ambiguous canonical cases should not be automatically deleted.

Robots.txt conflicts

If /private/ is disallowed but /private/report/ appears in your sitemap, decide whether the page should be crawled. A robots block is not a reliable way to prevent indexing.

Malformed XML and inaccessible files

Check that the sitemap returns HTTP 200 and contains XML rather than an HTML error page. Escape ampersands as & inside URLs. A sitemap index should reference accessible child sitemap files. Google limits each sitemap to 50,000 URLs or 50 MB uncompressed.

Practical cleanup workflow

Locate the sitemap, inspect a sample, fix the source in your CMS or generator, regenerate the XML and check the updated file in Search Console. For example, replace /old-product/ with /new-product/ only if the final page is indexable and preferred. Review temporary redirects and server errors before removing entries.

See Google’s sitemap documentation, our redirect guide and noindex guide.

Check your sitemap →