What the sitemap validator checks
This XML sitemap validator downloads the file the way a crawler does, without cookies or JavaScript, and checks it in three passes. First the bytes: the file must be UTF-8 and no larger than 50 MB once gzip is removed. Then the XML: every tag must close, nest correctly, and escape its special characters. Then the sitemaps.org protocol: the root element and namespace, each URL entry, and the limits on how many URLs one file can hold.
Problems are sorted into errors, which make the file invalid, warnings, which a reader may accept but which usually point at a mistake, and notes. Each one shows how often it occurs and the line numbers of the first examples, so the fix can start in the right place. The sitemap errors guide matches those results to the messages in Search Console.

XML errors and the unescaped ampersand
An XML reader stops at the first syntax error, so a single broken line can hide every URL after it. The most common one is a raw & in a URL with more than one query parameter. In XML it has to be written as &. The same applies to <, which becomes <.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/shoes?color=red&size=9</loc>
<lastmod>2026-01-15</lastmod>
</url>
</urlset>Other sitemap errors in this group are a closing tag that does not match the one that opened, a file cut off before </urlset>, and blank lines or spaces before the <?xml declaration, which must be the first thing in the file. When the address returns an HTML page instead, the result says so, because a login page or a 404 template is a common reason a sitemap cannot be read.
URL rules: full addresses on one host
Every <url> entry needs one <loc> with an absolute URL that starts with http:// or https://. A relative path such as /about is an error, and so is a URL of 2,048 characters or more. Spaces in a URL are flagged, because a URL in a sitemap should be escaped, with a space written as %20.
The protocol also ties URLs to the location of the sitemap. A sitemap on https://www.example.com/ covers URLs on that same protocol and host, so entries on http:// or on another subdomain are reported as warnings. The www host and the bare domain are treated as one site, because most sites redirect one to the other, and the difference is shown as a note. A sitemap at /blog/sitemap.xml covers only URLs under /blog/. The protocol's section on cross submits describes how a sitemap can list URLs from other sites, through the robots.txt file of each site. Duplicate URLs are listed too, since each URL only needs one entry.
The listed URLs should be the canonical addresses. The meta tag checker shows the canonical URL a page declares, and the og:url guide explains how the canonical and og:url should agree.
lastmod, changefreq, and priority
<lastmod> must use the W3C Datetime format: 2026-01-15, or a date and time with a time zone such as 2026-01-15T09:30:00+00:00. A date like 15/01/2026, a time with no time zone, or a day that does not exist is an error. A lastmod date in the future is a warning, because the value is meant to be the date the page last changed. Google's sitemap documentation says it uses lastmod only when it is consistently and verifiably accurate.
<changefreq> accepts always, hourly, daily, weekly, monthly, yearly, or never, in lowercase. <priority> accepts a number from 0.0 to 1.0. Both tags are optional, and Google's documentation says it ignores them, so the result adds a note when they are present. Other search engines may still read them.
Sitemap index files, gzip, and the 50,000 URL limit
One sitemap can hold up to 50,000 URLs and 50 MB (52,428,800 bytes) of uncompressed data. A larger site splits its URLs into several files and lists them in a sitemap index, which uses <sitemapindex> and <sitemap> entries with only <loc> and <lastmod>.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap-pages.xml</loc>
<lastmod>2026-01-16</lastmod>
</sitemap>
</sitemapindex>To validate a sitemap index, enter its address. The result checks the index and lists each sitemap it points to with a Validate link. Validate sitemap files from a large index one at a time, starting with the ones that changed last. Sitemaps listed on another host are flagged, since an index should list sitemaps on its own site. Files ending in .gz are decompressed before the check.
Image, video, news, and hreflang tags from their own namespaces are allowed inside a <url> entry and counted in the result. A prefix such as image: used without its xmlns:image declaration is reported as an error.
Text sitemaps and feeds
A text sitemap lists one full URL per line and nothing else. The sitemap checker reads it with the same URL rules, so a line with a relative path or a note is an error. An RSS or Atom feed is recognized and reported, but its entries are not checked, because the feed format has its own rules.
After the check
The result also says whether robots.txt on the same site has a Sitemap: line for the file. That line, or a submission in Search Console, is how search engines are told where the sitemap is. When the sitemap address redirects, the result shows the final address, which is the one to list.
A site with no sitemap can get one from the XML sitemap generator, which crawls the site and writes sitemap.xml and a sitemap index for large sites. To check sitemap URLs that move, run them through the redirect checker.
Limits of the check
- Only public http and https addresses are fetched. Localhost and private network addresses are refused.
- The pages listed in the sitemap are not requested, so a URL that returns 404 or redirects is not detected here.
- A sitemap index is checked as one file. Each sitemap it lists is validated separately.
- RSS and Atom feeds are recognized but not checked entry by entry.
- Results are not saved. Each check downloads the file again.