Free tool
XML Sitemap Validator
Checks a sitemap's structure, domains and tags, and scores what it finds.
How it works
What is the XML Sitemap Validator?
The XML Sitemap Validator is a free tool that fetches a sitemap file, checks that it is a <urlset> or <sitemapindex>, and tests its URLs for off-domain entries and missing tags. It returns a score out of 100, the number of critical errors, the file size, the response time and a list of every issue it found.
How to use the XML Sitemap Validator
- Paste the full URL of the sitemap file, such as https://example.com/sitemap.xml. Give the .xml file itself, not the domain.
- Press Validate sitemap. If the file is a sitemap index, the tool fetches up to 20 of the sitemaps it lists and checks their URLs.
- Read the Overview tab: the score, URL count, critical errors, file size, response time, and which of
lastmod,priorityandchangefreqthe file uses. - Open the Issues tab to see each problem, and the URLs tab to see up to 1,000 of the listed URLs.
What makes an XML sitemap invalid?
A sitemap is invalid when its root element is not <urlset> or <sitemapindex>, when a <loc> is not a full absolute URL, or when the XML itself is broken. An unescaped & in a URL is a common cause, because it has to be written as &.
The file also has hard limits of 50,000 URLs and 50MB uncompressed. This validator reports a missing or unknown root element as a critical error and warns when the total passes 50,000 URLs.
How is the sitemap score calculated?
The score starts at 100. The validator takes off 20 points if any URL is on a different domain from the sitemap, 40 if the URLs carry no <lastmod>, and 10 each if they carry no <priority> or no <changefreq>. The result is marked valid when there are no critical errors and the score is above 50.
Fix critical errors first, because they decide whether search engines can use the file. Then add accurate <lastmod> dates, which Google uses to plan re-crawls.
Why are URLs on another domain a critical error?
Search engines expect every URL in a sitemap to be on the same host as the sitemap file. Entries on another host are ignored unless that host has approved them, for example by verifying both sites in Search Console. A <loc> that is not a valid URL counts in the same total.
Subdomains count as other hosts, so a sitemap on example.com that lists blog.example.com pages is flagged. Search engines also treat www. and the bare domain as different hosts, so keep every URL on the same version as the sitemap file.
Questions
- How do I validate a sitemap XML file?
- To validate a sitemap XML file, paste its URL into this validator, or check it by hand. Open it in a browser to confirm it loads as XML, then confirm the root element, that every
<loc>is a full URL on your domain, and that it stays under 50,000 URLs. - Why does Google Search Console say my sitemap could not be read?
- Search Console reports that a sitemap could not be read when Google failed to fetch or parse the file. Check that the URL returns a 200 status, is not blocked in robots.txt or by a firewall rule, and serves XML rather than an HTML page.
- What is the correct lastmod date format in a sitemap?
- The sitemap
<lastmod>uses the W3C Datetime format: a date such as2025-01-15, or a full timestamp such as2025-01-15T09:30:00+00:00. The date should be when the page content last changed, not when the sitemap was generated. - Is lastmod required in a sitemap?
- No.
<lastmod>is optional in a sitemap, and only<loc>is required. Google does use<lastmod>to plan re-crawls when the dates are consistently accurate, which is why this validator takes the most points off when it is missing. - Does Google use sitemap priority?
- No. Google ignores the
<priority>and<changefreq>values in a sitemap. It does use<lastmod>when the dates are consistently accurate. - What is the maximum size of an XML sitemap?
- An XML sitemap can hold up to 50,000 URLs and be up to 50MB uncompressed. Gzip reduces the transfer size but does not raise either limit. Past them, split the URLs across several sitemaps and list those in a sitemap index.
Sitemap Tools
More in Sitemap Tools
Sitemap Index Generator
Combine several sitemaps into the one index file search engines expect.
Generate indexReady when you are
Before your next buyer asks AI about you, ask AI about yourself
One check, four engines, about twenty seconds. We show you the answers before we ask for anything.
