XML Sitemap Validator: How to Read Your Report
What each check means, which rules come from the sitemap protocol and which from Google and Bing, and how to fix the errors the tool finds.
Why Validate a Sitemap at All?
A sitemap is a list of the URLs you want search engines to find, and a surprising number of live sitemaps are quietly broken. A CMS plugin escapes nothing and a single bare ampersand makes the file unparseable. A staging domain slips into the list. A migration leaves thousands of relative paths. Search Console will usually tell you when a sitemap could not be read, but it is slower and less specific than checking the file yourself before you submit it.
It helps to be clear about what a sitemap does and does not do. It is a discovery hint, not an instruction. Listing a URL does not guarantee it will be crawled or indexed, and leaving one out does not hide it. A clean sitemap simply removes one avoidable source of trouble.
How to Use the Tool
Open your sitemap in a browser, usually at /sitemap.xml, view the source with Ctrl+U (Cmd+Option+U on Mac), copy everything and paste it into the box. If you know your canonical site address, type it into the optional field; otherwise the tool compares every URL against the first one in the file. Click Validate sitemap to get a 0–100 score, a list of issues with fixes, and a table of every entry with the problem ones highlighted. Load sample fills in a deliberately broken file so you can see each check fire.
The tool accepts three formats: a standard <urlset> sitemap, a <sitemapindex> file that points to other sitemaps, and a plain text file with one URL per line. Everything runs in your browser with plain JavaScript and nothing is sent to a server, so it is safe to use on staging files. Because a browser tool cannot fetch another site's sitemap directly, you paste the contents rather than entering a URL.
What Each Check Means
| Check | Severity | What to do |
|---|---|---|
| XML error (unclosed or mismatched tag, stray text) | Error | Fix the line the report names. A truncated download is a common cause. |
| Unescaped & in a URL | Error | Write it as & inside the XML. |
| Wrong root element or missing namespace | Error | Start with <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">. |
| Over 50,000 entries or 50MB | Error | Split into several files and list them in a sitemap index. |
| Relative, local or space-containing URL | Error | Use full https:// addresses; encode spaces as %20. |
| Different host or protocol | Error | Every URL must match the sitemap file’s own protocol and host. |
| Invalid lastmod, priority or changefreq | Error | Use W3C dates, priority 0.0–1.0, lowercase changefreq words. |
| Duplicate URL, #fragment, tracking parameters | Warning | List each clean canonical URL once. |
| Future or all-identical lastmod | Warning | Output each page’s real modified date. |
| priority / changefreq present | Note | Harmless; Google ignores them. |
Rules from the Protocol vs. Rules from the Search Engines
Two different authorities sit behind these checks. The sitemaps.org protocol defines the file format: the required <urlset>, <url> and <loc> elements, UTF-8 encoding, entity escaping, the 50,000-URL and 50MB limits, and the rule that all URLs share the sitemap’s protocol and host. Break one of those and a parser can reject the file or skip entries, which is why the tool reports them as errors.
The search engines then add their own guidance on top. Google’s sitemap documentation says it uses lastmod only when the value is consistently and verifiably accurate, and that it ignores priority and changefreq. Bing’s webmaster blog makes the same point about lastmod and says it largely ignores the other two fields. That is why a sitemap where every page has today’s date earns a warning, not an error: it is valid, just unhelpful.
Fixing the Most Common Problems
Bare ampersands. Any URL with a query string such as ?color=red&size=m must be written with & in the XML. Most generators do this for you; hand-edited files and some export scripts do not. The tool reports the line so you can find the first offender, and fixing the generator beats patching the file.
Relative or mixed-host URLs. These nearly always come from a migration or a staging copy being published. Check the base URL setting in your CMS or sitemap plugin, regenerate, and re-validate. Remember that www and non-www are different hosts, so the sitemap should use whichever version you have chosen as canonical.
Dates. A valid lastmod is a date such as 2026-11-02 or a full timestamp with a timezone, such as 2026-11-02T09:30:00+00:00. A timestamp with no timezone is not valid, which is a very common bug. If your platform cannot supply true modified dates, omitting lastmod is better than filling it with the build time.
Size limits. Past 50,000 URLs or 50MB uncompressed, split the file and create a sitemap index that lists the parts. Many sites split earlier by content type, for example one file for posts and another for products, so a problem in one section is easier to spot in Search Console.
Duplicates and tracking URLs. If the same page appears twice, or with utm_ parameters, you are asking crawlers to fetch the same content repeatedly. List the clean canonical version once. If you are unsure which version is canonical, the Redirect Checker will show where each variant actually ends up.
After the Sitemap Passes
A clean score means the file is structurally sound, not that the pages in it will be indexed. Upload the corrected file, make sure your robots.txt points to it with a Sitemap: line (our Robots & Sitemap Generator can write that), then submit it in Google Search Console and Bing Webmaster Tools and watch the Sitemaps report for the discovered-URL count. If URLs are submitted but not indexed, the cause is usually content quality, duplication or crawl access rather than the sitemap format, and the SEO Audit Tool is a better next stop.
Limits to Know About
The tool checks structure and consistency inside the text you paste. It does not request your URLs, so it cannot tell you whether a listed page returns a 404, redirects, or carries a noindex tag. It uses a lightweight checker rather than a full XML parser, so very unusual constructs such as inline DTD entities are not evaluated. Image, video and news extensions are tolerated but their own fields are not validated. The score is a deduction model built for this tool, not a metric published by any search engine, so use it to find problems rather than to chase 100.
Related tools: Robots & Sitemap Generator · Redirect Checker · AI Crawler Access Checker · SEO Audit Tool