Dev and API

XML Sitemap Validator — Errors, Limits and robots.txt

Give it a domain or the XML address and see how many URLs the sitemap declares, what falls outside the specification, and whether robots.txt mentions it.

  • no sign-up
  • free
  • nothing stored
Loading the validator...

What an XML sitemap does — and does not do

A sitemap is a list of the URLs you want search engines to know about. It is worth being precise about the scope: it does not order indexing, does not improve rankings and does not compensate for a weak page. What it does is solve a discovery problem — saying "these pages exist" to a crawler that might not have reached them by following links.

The payoff is largest in three situations: large sites, where walking everything by link is expensive; new sites, with no external links pointing at them yet; and pages that are poorly connected internally. On a small, well-linked site a sitemap makes little difference — which is no reason not to have one, given it costs practically nothing.

The two limits that reject the entire file

The specification caps each file at 50,000 URLs and 50 MB uncompressed. The detail that catches people out: exceeding either does not make the crawler trim the overflow — it discards the whole sitemap. A site that grew past 50,000 URLs can spend months with its sitemap silently ignored.

The way out is splitting the list across several files and publishing a sitemapindex pointing at all of them. Only one level of nesting is allowed: an index cannot point at another index. And the 50 MB limit applies to uncompressed content — serving gzipped saves bandwidth but does not change the maths.

lastmod: useful when true, ignored when not

lastmod is the optional field that pays off most, because it is what Google uses to decide what to revisit first. But it is only taken seriously while it stays trustworthy. A sitemap generated with today’s date on every entry, or with dates in the future, leads Google to conclude the field carries no information — and from then on it is ignored across the whole site, including the pages where it was accurate.

The accepted format is W3C Datetime: 2026-08-18 or 2026-08-18T14:30:00-03:00. Other date formats are rejected, as is a date and time separated by a space instead of the T. As for changefreq and priority, Google states openly that it ignores both — declared frequency almost never matches reality, and everyone marks their own pages as top priority.

A sitemap only speaks for its own site

URLs listed in a sitemap must belong to the same host serving it. The rule is stricter than it looks: subdomains are different hosts, and so are example.com and www.example.com. Entries outside that scope raise no visible error — they are simply ignored, which makes the problem hard to notice without a validation like the one above.

Finally, declaring the sitemap in robots.txt costs one line and guarantees any crawler finds it, without depending on manual submission in each webmaster tool. The validation above checks that automatically and warns when the line is missing.

## faq

Frequently asked questions

What is an XML sitemap?

It is a file listing the URLs on your site that you want search engines to know about. It does not order anything to be indexed — it is a hint about where to look, useful mainly when pages are hard to reach through internal links, when the site is large, or when it is new and has not earned external links yet. Each entry must carry a loc tag with the full URL, and may optionally carry lastmod, changefreq and priority.

What is the difference between urlset and sitemapindex?

urlset is the sitemap proper: it lists page URLs. sitemapindex is an index pointing at other sitemaps, and it exists because a single file cannot exceed 50,000 URLs or 50 MB uncompressed. Large sites split the list across several files and publish an index pointing to all of them. An index may point at up to 50,000 sitemaps, but it cannot point at another index — only one level of nesting is allowed.

What are the sitemap limits?

There are two, and they apply per file: a maximum of 50,000 URLs and a maximum of 50 MB uncompressed. Exceeding either one makes the crawler reject the whole file, not just the overflow. The fix is splitting into smaller sitemaps and declaring them all in a sitemapindex. Note that the 50 MB limit applies to the uncompressed file: you may serve the sitemap gzipped, but what counts is the content after decompression.

Does lastmod actually matter?

Yes, when it is trustworthy. Google uses lastmod to decide what to revisit first — but only if it believes the value. If a sitemap claims every page was modified today, or carries dates in the future, Google concludes the field carries no information and starts ignoring it across the whole site. The format must be W3C Datetime: 2026-08-18 or 2026-08-18T14:30:00-03:00. Dates in other formats are discarded.

Are changefreq and priority worth anything?

Not to Google. It states explicitly that it has ignored both for years: changefreq because the declared frequency rarely matches reality, and priority because everyone marks their own pages as important. Other crawlers may take them into account, and invalid values can make some validators reject the file — which is why the tool above flags values outside the allowed set, but classes them as a note rather than an error.

Can I list URLs from another domain in my sitemap?

No. A sitemap may only list URLs from the same host it is served from — and the rule counts subdomains, plus the www and non-www variants, as distinct hosts. URLs outside that scope are simply ignored. There is one rarely used exception: if you verify ownership of several domains in Search Console, cross-domain sitemap submission is possible, provided the sitemap is declared in the robots.txt of each one.

Do I need to declare the sitemap in robots.txt?

It is not required, but it is the cheapest way to make sure any crawler finds it. A single line — "Sitemap: https://example.com/sitemap.xml" — anywhere in robots.txt is enough; it is global and belongs to no User-agent group. Without it you depend on submitting the file by hand in each webmaster tool, which covers Google and Bing and does nothing for the rest. The validation above checks this automatically.

## other tools