Other blogsGuides

How to check a sitemap for errors and fix the common ones

Find the file, validate it, fix the generator, check the URLs inside it and confirm with Google.

To check a sitemap for errors, run the live file through a validator that tests it against the sitemaps.org protocol and Google's limits, fix what it lists, then confirm in Google Search Console. The seogeoaeo.ai XML Sitemap Validator handles the first step in one run and names the failing URLs and dates, which makes the fixes quick.

Sitemaps are usually generated by a framework or a build step, so most errors come from code, not typing. This guide walks through the check and the fixes developers run into most.

Step 1: find the file

Look for /sitemap.xml or /sitemap_index.xml on your domain, or read the Sitemap: lines in /robots.txt. If the site has an index, note every child sitemap it lists. Each one needs its own check.

Step 2: run the validator

Paste the full sitemap URL into the seogeoaeo.ai XML Sitemap Validator. It reads the live file and reports on:

  • whether the XML is well formed
  • the sitemaps.org namespace
  • file size against 50 MB uncompressed
  • entry count against 50,000 URLs
  • URLs that fall outside the sitemap's scope
  • lastmod values that are missing or invalid

A run costs 10 credits and the price shows up front. If you want this in CI, the same tool is available over a REST API and MCP with a workspace API key, so a deploy can fail when the sitemap breaks.

Step 3: fix the common errors

These are the errors that come up most, with the Search Console name for each where Google has one.

Error Search Console name Usual cause Fix
XML will not parse Parsing error An unescaped & or < in a URL Escape values when the generator writes them
Wrong or missing namespace Incorrect namespace A hand-rolled template Use http://www.sitemaps.org/schemas/sitemap/0.9 on the root tag
URLs on another host URL not allowed, or path mismatch www and bare domain mixed, or http and https mixed Build URLs from one canonical origin
URLs above the sitemap's folder URL not allowed Sitemap served from a subfolder Serve it from the site root
Bad lastmod Invalid date Dates formatted for display, such as 10/20/2026 Output W3C Datetime, such as 2026-10-20
Too large Too many URLs, or file size error Content growth Split into several files and add an index

Two habits prevent most of these. Generate every loc from a single base URL constant, so the host and protocol never drift. And set lastmod from the page's real content update time, because Google uses it only when the dates stay accurate. It ignores priority and changefreq entirely.

Step 4: check the URLs inside the file

A sitemap can be valid and still list pages that redirect, return errors or carry noindex. The validator checks the file, not the pages. For that, seogeoaeo.ai's Orphan Page Finder crawls from your home page, reads the sitemap and flags entries that fail, redirect or are noindex. Its crawl stops at 150 pages, so a large site needs a full crawler for this step.

Step 5: confirm with Google

Submit the sitemap in Search Console's Sitemaps report. After Google reads it, the status should say Success. "Has errors" means some entries failed but the rest were queued. "Couldn't fetch" points to access problems such as a robots.txt block, a 404 or a server error, which a file validator cannot see.

The validator cannot tell you whether Google read the file, and Search Console cannot tell you before Google does. Use both, in that order.

When something else fits better

If your sitemap uses image, video or news extension tags, the seogeoaeo.ai validator does not check those, so lean on Search Console for them. For a quick offline structure check in a build, xmllint can validate against the schema published on sitemaps.org, though it will not catch scope or Google's limits.

Browse guides by topic