A sitemap that Google cannot read does nothing for you, and a single stray & can make the whole file fail. The free XML Sitemap Validator checks your file against the sitemaps.org rules and Google's guidelines, and lists every problem with a line number and a plain-English reason. It works on normal sitemaps, gzip-compressed ones and sitemap index files.
This guide shows how to use it, what each message means and how to fix the ones people meet most often. If you still need to make a sitemap, use the Sitemap Generator and read its guide.
What XML Sitemap Validator does
It reads the file and reports:
- whether the XML is well formed, and if not, where it breaks;
- whether the root element is
<urlset>or<sitemapindex>, with the correct namespace; - whether each entry has exactly one absolute
<loc>address; - whether
<lastmod>,<changefreq>and<priority>use valid values; - duplicates, over-long addresses, mixed hosts and protocols, and the 50,000 URL and 50 MB limits;
- any extensions it finds, such as image, video, news and hreflang (xhtml) entries.
It does not request the URLs inside the sitemap. A page that returns 404, redirects somewhere else or carries a noindex tag looks fine to the validator. Check suspect pages separately with the Redirect Checker or your browser.
How to use XML Sitemap Validator, step by step
- Open XML Sitemap Validator.
- Next to "Sitemap source", choose "Fetch from URL" or "Paste XML".
- For a live file, type the address in "Sitemap URL" (for example
https://example.com/sitemap.xml) and press "Validate". - For a draft, paste the XML into "Sitemap XML". If you know where it will live, add that address in "Sitemap URL (optional)" so host and folder checks work.
- Read the Stats row (Type, URLs, Size, Errors, Warnings), then the "Issues" table.
- Fix the file, upload it, and validate again.
Every part of the page explained
Fetch from URL
The tool downloads the file for you, follows up to 5 redirects, and decompresses .xml.gz files automatically, including ones served without a gzip header. It handles files up to 10 MB. A status line shows the final address, the HTTP status, the number of redirects, the size and the content type. If the status is not 200, the tool says that "The sitemap must return HTTP 200" and does not try to validate the content. If the file is larger than 10 MB, only the first 10 MB is read, so the XML will look cut off; validate it locally or split it.
Paste XML
The text box starts with a sample that has two deliberate mistakes, so you can see how errors are reported. Your own XML is checked about 0.4 seconds after you stop typing. The optional "Sitemap URL" tells the tool where the file will be, so it can compare the host, the protocol and the folder of each address.
Stats row
Type shows "URL set" or "Sitemap index". The second box counts URLs (or Sitemaps for an index) and shows a warning symbol above 50,000. Size is measured after decompression. Errors and Warnings are counted separately. A green note reads "Valid sitemap. No problems found." when both are zero, and "Valid sitemap with some warnings" when only warnings exist. If extensions are found, the note lists them, such as "image (3)".
Issues table
Errors come first, then warnings, then information notes, each in line order. Where possible the message shows the line of the entry's opening tag and the URL involved. Up to 1,000 issues are listed. Keep in mind that the line is that of the <url> entry, not necessarily the line of the faulty tag inside it.
URLs table and search
Below the issues, a table lists each entry: line, URL, last modified, change frequency, priority and any extras. The Search box filters by URL. The table shows 500 rows at a time, and a note tells you if there are more.
Index files
For a sitemap index, the table is titled "Child sitemaps" and each row has a Validate button when you used "Fetch from URL". Press it and the child file loads, with a "Back to" button to return to the index. In Paste XML mode, the tool reminds you to switch to "Fetch from URL" to check the children.
A worked example
The sample in the box is:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2025-01-15</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/about</loc>
<lastmod>15/01/2025</lastmod>
<priority>1.5</priority>
</url>
</urlset>
The Stats row says URL set, 2 URLs, 2 Errors and 0 Warnings. The Issues table lists two errors for line 9, where the second entry starts:
<lastmod> "15/01/2025" isn't a W3C datetime (use 2024-05-31 or 2024-05-31T14:20:00+00:00).<priority> "1.5" must be a number from 0.0 to 1.0.
Change the date to 2025-01-15 and the priority to 0.8, and the note turns green: Valid sitemap. No problems found.
What it accepts and its limits
- Fetching: public sites on ports 80, 443, 8080 and 8443, files up to 10 MB, with up to 5 redirects. Private, local and internal addresses are refused. Up to 20 fetches a minute per visitor.
- Compression:
.xml.gzsitemaps are decompressed before checking. The 50 MB limit applies to the uncompressed size. - Encoding: the file must be UTF-8. If the XML declaration says otherwise, you get a warning.
- Sitemap protocol limits: 50,000 entries and 50 MB per file; a larger one is an error and the message tells you to split it with an index.
Privacy
There are two paths. If you paste XML, the check runs in your browser and nothing is sent to us. If you use "Fetch from URL", the address you type is sent to our server, which downloads the file (identifying itself as TechSolutionPointBot) and returns it to your page. The validation itself still happens in your browser.
Common problems and how to fix them
"XML syntax error"
The message includes a line, a column and a reason from your browser. The most frequent cause is a raw ampersand in a URL, such as ?id=5&page=2, which must be written &. The tool adds a hint when it spots that case. Other causes are a missing closing tag, a tag typed with the wrong case, or text before the <?xml line.
"This is an HTML page, not an XML sitemap"
The address returned a web page, often a 404 page, a login screen or a redirect to your home page. Open the address in a browser, correct the path and check redirects.
"Missing namespace" or "Wrong namespace"
The root tag must read <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">. Copy it exactly, and the same for <sitemapindex>.
"<lastmod> ... isn't a W3C datetime"
Use 2025-03-01, 2025-03, 2025, or a full timestamp with a time zone, such as 2025-03-01T14:30:00+06:00 for Bangladesh time. A timestamp with no zone (2025-03-01T14:30:00) is rejected, and so are day-first dates like 01/03/2025. A date more than a day in the future gets a warning.
"<loc> must be an absolute http:// or https:// URL"
The address is relative (/about) or uses another scheme. Write the whole address, starting with https://.
"Duplicate URL (first listed on line N)"
The same address appears twice. Remove one. Only the first 200 duplicates are listed, followed by the total.
"URL is on ... but the sitemap is on ..."
For a fetched file, the comparison uses the final address after redirects. If http://example.com/sitemap.xml redirects to https://www.example.com/sitemap.xml, every URL written without www triggers this warning. Make the addresses in the file match the final host.
"URLs are outside /folder/"
An information note. A sitemap in a sub-folder normally covers only that folder and below. Move it to the root, or make sure it is submitted in Search Console or listed in robots.txt.
"<changefreq> isn't valid" or "<priority> must be a number"
Use always, hourly, daily, weekly, monthly, yearly or never for the first, and 0.0 to 1.0 for the second.
Related tools
- Sitemap Generator: build a clean sitemap from a URL list.
- Robots.txt Tester: confirm that your sitemap URLs are not blocked.
- Redirect Checker: follow a redirect chain to the final address.
- Sitemap "couldn't fetch" in Search Console: what to do when Google cannot download the file.
- How to submit a sitemap to Google Search Console: the next step once the file is valid.
Quick checklist
- Validate after every change to the sitemap.
- Fix all errors, then read the warnings.
- Escape ampersands, and use W3C dates with a time zone.
- For an index, validate each child file.
- Keep the final host and protocol consistent.



