GrowthGPTGrowthGPT
Start Building
SEO10 min read

How to Use the XML Sitemap Validator: Checks, Score, Fixes

Validate your XML sitemap free: ten protocol checks, a 0-100 score, errors vs warnings, and a sortable URL table. How to read each result and fix what it finds.

R
Rajesh Kalidandi
AI Engineer, GrowthGPT · September 9, 2026
Image coming soon

An XML sitemap validator checks a sitemap file against the sitemaps.org protocol: whether the XML is well formed, the namespace is correct, every URL is absolute and unique, and the lastmod, changefreq, and priority values are legal. GrowthGPT's validator runs ten checks in your browser and returns a score, an issue list, and a sortable URL table.

A broken sitemap fails quietly. Search Console may report it as read, a parse error may drop half the file, and nobody notices until a batch of new pages takes weeks to show up. This guide walks through how to run the XML Sitemap Validator, how to read every part of the result, how to fix the errors it finds, and where its job ends. If you do not have a sitemap yet, start with how to use the XML Sitemap Generator and come back here to check the file before you ship it.

What does the XML Sitemap Validator check?

The validator parses the XML you give it and scores it against ten checks. Each passed check is worth ten points, so the score runs from 0 to 100 and a single failure costs you exactly ten. The rules come from the sitemaps.org protocol, which is the format Google, Bing, and every other major crawler read.

  1. Valid XML structure. The file parses as well-formed XML. A single unescaped ampersand fails this check, and the parser error is shown in the issue list.
  2. Has XML declaration. The file opens with <?xml version="1.0" encoding="UTF-8"?>.
  3. Correct namespace. The root element declares xmlns="http://www.sitemaps.org/schemas/sitemap/0.9".
  4. All URLs are absolute. Every <loc> starts with http:// or https://. Relative paths are listed individually as errors.
  5. No duplicate URLs. Each location appears once. Duplicates are listed by URL.
  6. Valid lastmod dates. Dates are either a plain date (2026-10-01) or a timestamp with an optional time zone, to the minute (2026-10-01T09:30+00:00) or the second (2026-10-01T09:30:00+00:00).
  7. Valid changefreq values. Only always, hourly, daily, weekly, monthly, yearly, or never.
  8. Valid priority values. A number between 0.0 and 1.0.
  9. URL count under 50,000. The protocol limit for a single file.
  10. Good metadata completeness. At least 80 percent of entries carry a lastmod date.

It handles both formats: a regular <urlset> of pages and a <sitemapindex> that points to other sitemaps. The result header tells you which one it detected, which is a useful sanity check on its own when a CMS plugin has quietly swapped one for the other.

How do I validate an XML sitemap?

The whole run takes under a minute. The value is in reading the output in the right order.

Step 1: Get the raw XML, not the rendered view

Open your sitemap URL, usually /sitemap.xml, and use view source to copy the raw file. Many sitemaps ship with an XSL stylesheet that renders them as a styled table in the browser, and copying that table gives you text, not XML. If your sitemap is served as a gzipped .xml.gz file, decompress it first. The validator reads plain XML only.

Step 2: Paste it, upload it, or load a sample

Paste the XML into the input on the XML Sitemap Validator, or use Upload File to load a saved .xml file. If you want to see what a clean result looks like before testing your own, load one of the four samples: Basic, Blog, E-commerce, or Sitemap Index. Then click Validate Sitemap. Nothing is sent to a server. The parsing and every check run in your browser, which also means you can validate a staging sitemap that is not publicly reachable.

Step 3: Read the score as a count of failures

A score of 100 means all ten checks passed. Anything lower means at least one check failed, and the score tells you how many: 90 is one failure, 70 is three. Do not treat 80 as “good enough”. A failed XML structure check alone can mean crawlers read nothing past the error. Go straight to the check list and find the red items.

Step 4: Work errors before warnings

The Issues and Warnings panel separates the two. Errors are protocol violations: parse failures, a wrong namespace, relative or duplicate URLs, bad dates, illegal changefreq or priority values, and an over-limit URL count. Warnings are advisory: a missing XML declaration, lastmod coverage under 80 percent, and URLs without priority or changefreq. Missing priority and changefreq never cost you points, and Google's guidance on building a sitemap says it ignores both tags. Treat those two warnings as informational.

Step 5: Use the stats row to catch structural surprises

Next to the score you get four numbers: URLs (or sitemaps) found, the count of unique domains, how many entries carry lastmod, and how many carry priority, each with a coverage percentage. Two of these catch problems the checks do not:

  • Unique domains should be 1. The protocol expects every URL in a sitemap to sit on the same host as the sitemap. A count of 2 usually means a mix of www and non-www, or a staging host that leaked into production.
  • URLs found should match your page count. If you know the site has around 300 indexable pages and the sitemap lists 40, the generator is missing a section. If it lists 4,000, it is including parameter URLs, tag archives, or paginated pages that should not be there.

Step 6: Filter and sort the URL table

The table lists every location with its lastmod, changefreq, and priority. You can filter by any string in the URL and sort by URL, lastmod, or priority. Three quick passes find most real problems:

  • Sort by lastmod. If every URL shares the same timestamp, your CMS is stamping the build time instead of the content change time. Google only trusts lastmod when it is consistently accurate, so a fake value is worse than none.
  • Filter for junk patterns. Try ?, /tag/, /page/, staging, and http://. Anything that matches is a URL you are asking Google to spend crawl on that you probably do not want indexed.
  • Filter for your money pages. Search for your most important product, service, or pillar URLs and confirm they are actually in the file. A missing pillar page is the most expensive sitemap bug there is.

How do I fix common XML sitemap errors?

Most failures trace back to a handful of causes. Fix them in the generator or CMS setting that produces the file, not by hand-editing the output, or the error returns on the next build.

  • XML parse error. Almost always an unescaped & in a URL with query parameters. It must be written as &amp;. Stray characters before the declaration, such as a blank line or a byte order mark emitted by a plugin, cause the same failure.
  • Wrong or missing namespace. Copy the namespace string exactly. A typo, an https version of the schema URL, or a missing xmlns attribute all fail.
  • Relative URLs. Every <loc> needs the full protocol and host. Set the site URL in your generator config so it prefixes paths correctly.
  • Duplicate URLs. Usually the same page listed twice by two sources, such as a pages loop and a posts loop. Remove the overlap at the source. Near-duplicates the validator cannot catch, like a trailing slash and no trailing slash, are worth filtering for manually.
  • Invalid lastmod. Use a plain date or a W3C datetime timestamp, to the minute or the second. Locale formats like 10/01/2026 fail, and so do timestamps with a space instead of the T separator. Most of these come from a CMS template writing dates in display format, so fix the template once rather than the sitemap.
  • Illegal changefreq or priority. Values like “biweekly” or a priority of 5 are invalid. Since Google ignores both tags, the simplest fix is often to stop emitting them.
  • Over 50,000 URLs. Split the file by section, such as pages, posts, and products, and list each child in a sitemap index. Validate the index, then validate each child.

Once it passes, reference the sitemap in robots.txt with a Sitemap: line. The Robots.txt Generator adds it for you, and how to use the Robots.txt Generator covers the rest of that file. Then submit the sitemap in Search Console, as described in Google's sitemaps overview.

What does a sitemap validator not check?

The validator tests the file, not the pages in it. It never requests the listed URLs, so a sitemap can score 100 and still be full of URLs that redirect, return 404, carry a noindex tag, or canonicalize somewhere else. Each of those sends Google a contradictory signal: the sitemap says “index this” and the page says “do not”. It also does not measure file size against the 50MB limit and does not open the child sitemaps listed in an index. Here is where each check lives:

QuestionXML Sitemap ValidatorSearch Console Sitemaps reportURL-level tools
Is the XML well formed and protocol compliant?Yes, ten checksPartly, reports fetch and parse errorsNo
Can I test before deploying?Yes, paste any XMLNo, the file must be liveNo
Do listed URLs redirect or return errors?NoIndirectly, through the Page indexing reportYes, with a redirect checker
Do listed URLs canonicalize elsewhere?NoIndirectlyYes, with a canonical checker
Did Google actually index the URLs?NoYesNo

For the URL side, run a sample of sitemap entries through the Redirect Checker and the Canonical Checker, and confirm the pages are not blocked with the Robots.txt Analyzer. A sitemap should list only final, canonical, indexable, 200-status URLs. Anything else dilutes the signal for the URLs that are.

Will a valid sitemap get my pages indexed?

No, and this is the most common misunderstanding about sitemaps. A sitemap solves discovery. It tells Google the URLs exist and, with accurate lastmod values, when they changed. It has no say in whether a page is judged worth indexing. After you fix the file, open the Page indexing report in Search Console and filter by your sitemap. If URLs sit in “Discovered, currently not indexed”, Google has not fetched them yet, and how to get pages indexed faster covers that. If they sit in “Crawled, currently not indexed”, Google fetched them and said no, which is a content problem. Our guide to Crawled, currently not indexed walks through the diagnosis and the fixes that work.

A broader page-level health check helps here too. The Website Grader scores the technical and content basics of a page, and how to use the Website Grader explains how to prioritise what it finds.

Does a clean sitemap help with AI search?

Indirectly, through the index. Google's documentation on AI features states that a page must be indexed and eligible for a snippet to appear as a supporting link in AI Overviews or AI Mode. A sitemap that drops your newest pages, or buries them among thousands of junk URLs, delays the step everything else depends on. Other assistants run their own crawlers with their own rules, which how AI crawlers work breaks down. Getting cited once you are indexed is a separate discipline, covered in the generative engine optimization guide.

A practical routine: validate the sitemap whenever you change the generator, the CMS, or the URL structure, and spot-check it monthly. It takes a minute, and while it rarely finds anything, when it does it finds something that was silently costing you every new page. Pair it with the XML Sitemap Generator to rebuild the file from a fresh crawl and the Meta Tag Analyzer to confirm the pages you list are not carrying a stray noindex.

Frequently Asked Questions

What does the XML Sitemap Validator check?

It runs ten checks against the sitemap protocol: well-formed XML, an XML declaration, the correct sitemaps.org namespace, absolute URLs, no duplicate URLs, valid lastmod dates, valid changefreq values, priority between 0.0 and 1.0, no more than 50,000 URLs, and lastmod present on at least 80 percent of entries. Each passed check is worth ten points.

Does the validator fetch my sitemap or the URLs inside it?

No. You paste the XML or upload a saved file, and the checks run in your browser against that text. It does not request the listed URLs, so it cannot see status codes, redirects, noindex tags, or canonicals. Use a redirect checker and a canonical checker for those.

Why does the validator warn about missing priority and changefreq?

Both tags are optional in the protocol, so missing values appear as warnings and do not lower the score. Google has said it ignores priority and changefreq, so on a site that mainly cares about Google you can leave them out. Accurate lastmod values matter far more.

Can I validate a sitemap index file?

Yes. The validator detects a sitemapindex root automatically, lists the child sitemaps it references, and runs the same structural checks. It does not open the child sitemaps, so paste each child file in turn to validate the URLs they contain.

Does a valid sitemap mean Google will index my pages?

No. A valid sitemap helps Google discover and recrawl URLs. Whether each URL is indexed depends on the page itself: its quality, its uniqueness, its canonical signals, and how strongly the rest of your site links to it. Pages Google fetches and then rejects show up as Crawled, currently not indexed.

What is the maximum size of an XML sitemap?

The protocol allows up to 50,000 URLs and 50MB uncompressed per sitemap file. The validator checks the URL count but not the file size. If you are near either limit, split the URLs across several sitemaps and list them in a sitemap index.

Ready to put this into practice?

Explore free AI-powered workflows for SEO, growth, and content, built for teams who move fast.

Explore free tools