What is an XML sitemap?
An XML sitemap is a file that lists the URLs of a site a search engine should know about, each in a url element with its loc and optional lastmod, defined by the sitemaps.org protocol 0.9. One file holds at most 50,000 URLs and 50 MB uncompressed, larger sites list several files in a sitemap index, and every URL must be absolute and on the sitemap's own host. A sitemap helps discovery; it does not guarantee crawling or indexing.
How to use XML Sitemap Validator
- Enter the sitemap URL (for example https://www.example.com/sitemap.xml), or paste the XML into the second field to validate it without fetching.
- Press Validate sitemap.
- Fix the Errors first — a strict parser rejects an ill-formed file entirely — then review the Warnings.
- Use Tags and coverage to see how many entries carry lastmod, alternates and other fields, and the Entries table to locate each one by line.
XML Sitemap Validator features
- Fetches a sitemap through the Mutqan server (up to 512 KiB) or validates XML you paste without sending it
- Checks well-formedness in one pass: balanced tags, unescaped ampersands and less-than signs, a urlset or sitemapindex root and the sitemaps.org 0.9 namespace
- Validates every entry: absolute http(s) loc URLs of at most 2,048 characters, duplicates, W3C Datetime lastmod values and lastmod dates in the future
- Checks changefreq and priority values, and flags fields that do not belong in a sitemap index
- Applies the protocol limits — 50,000 entries and 50 MB per file — and the same-host and directory-scope rules when the sitemap URL is known
- Reads hreflang alternates (xhtml:link) and image, video and news extension tags, and counts how many entries carry each field
- Recognises plain-text sitemaps, HTML error pages, RSS or Atom feeds and gzip files and says what they are instead of listing hundreds of errors
Inputs and outputs
Inputs
- Sitemap URL — fetched through the Mutqan server, redirects followed (up to five); also used for the same-host and directory checks.
- Or the sitemap XML pasted — validated in your browser with nothing fetched; a URL given as well only scopes the host checks. Plain-text sitemaps (one URL per line) are accepted too.
Outputs
- Summary — the root type (urlset, sitemapindex or invalid), entries, errors, warnings, size and whether the XML is well-formed.
- Errors and Warnings — each problem with its entry number and line.
- Tags and coverage — the namespace, how many entries carry lastmod, changefreq, priority and hreflang alternates, image, video and news tag counts, duplicates and hosts.
- Entries — up to 500 rows with location, lastmod, changefreq, priority, alternates and line, downloadable as CSV.
- Fetch details — final URL, HTTP status, Content-Type, bytes downloaded, resolved address and timing.
XML Sitemap Validator example
A sitemap with an unescaped query string and an impossible date
Input:
Pasted urlset with three url entries: https://www.example.com/ (lastmod 2026-09-28, an ar alternate), https://www.example.com/pricing (lastmod 2026-02-30, changefreq monthly) and https://www.example.com/blog/launch?utm=x&ref=home (priority 0.6)Output:
Type urlset · Entries 3 · Errors 2 · Warnings 0 · Size 573 B · Well-formed XML ✗
Line 14: unescaped "&" — write it as & (XML parsers reject the file).
Entry 2 (line 8): <lastmod> "2026-02-30" is invalid — day 30 does not exist in 2026-02.
With lastmod 2 / 3 · With hreflang alternates 1 / 3 · Hosts www.example.comHow to read the XML Sitemap Validator results
Errors are things the protocol forbids: a search engine skips the entry or, for well-formedness errors, the whole file. Warnings are allowed but worth fixing, such as a missing namespace, every lastmod being identical, or an http URL in a sitemap served over https.
Well-formed XML ✗ means a strict XML parser stops at the first error. Some search engines recover; others discard the file, so treat it as blocking.
Type sitemapindex means the entries are other sitemaps. Each child must be validated on its own; the index only proves that the list of children is correct.
With lastmod 2 / 3 means two of three entries carry a lastmod. Search engines use lastmod as a hint only when it is consistently accurate, so a partial or build-time-stamped lastmod has little value.
When to use XML Sitemap Validator
- Validate the sitemap a CMS or build step generates before submitting it in Search Console or Bing Webmaster Tools.
- Find why Search Console reports "Couldn't fetch" or "Sitemap could not be read": an HTML error page, a wrong root element or an unescaped "&" all show up here.
- After a migration, confirm that every loc uses the new host and https, and that no URL falls outside the sitemap's directory.
- Check hreflang alternates declared in the sitemap: valid language codes, absolute URLs and the count of entries that carry them.
Troubleshooting
- "This is an HTML page, not an XML sitemap": the URL returns a web page — usually a 404 page served with status 200, or a login page. Open the URL in a browser and correct the path.
- "unescaped &": a URL with a query string was written into loc without escaping. Escape the ampersand as an XML entity in the generator, or remove tracking parameters from sitemap URLs.
- Cross-host errors although the hosts look the same: www.example.com and example.com are different hosts, and so are http and https. List URLs of the exact host that serves the sitemap.
- A gzip (.gz) sitemap: the checker cannot decompress it. Download it, decompress it and paste the XML.
- A warning that the sitemap is larger than 512 KiB: the Mutqan server read only that much, so only the entries before the cut were checked and the entry cut in half was left out. Validate the full file by pasting it (up to 2 MB) or by splitting it into smaller sitemaps.
Frequently asked questions about XML Sitemap Validator
What limits does one sitemap file have?
At most 50,000 URLs and 50 MB (52,428,800 bytes) uncompressed per file, each loc element at most 2,048 characters. A larger site splits its URLs over several sitemaps and lists them in a sitemap index, which has the same limits. The validator reports a file over either limit as an error.
Why are URLs on another host reported as errors?
The sitemaps.org protocol lets a sitemap list only URLs on its own host, and by default only at or below the directory it is served from. Cross-host URLs count only when the other host vouches for the sitemap with a Sitemap line in its own robots.txt. The host and path checks use the URL you fetched or entered.
Which date format does lastmod need?
W3C Datetime: a date such as 2026-09-28, or a date and time with a time zone such as 2026-09-28T14:30:00+03:00. A time without a time zone, or a date that does not exist such as 2026-02-30, is an error. Google uses lastmod only when it is consistently accurate, and ignores changefreq and priority.
Why does an "&" in a URL break the whole file?
XML reserves the ampersand: inside a loc element it must be written as an entity (the ampersand followed by "amp;"). A bare "&" from a query string makes the document ill-formed, and a strict XML parser then rejects every entry, not just that one. The validator reports the line of the first one.
Does the validator check that the listed pages work?
No. It validates the sitemap file and requests nothing it lists. To review the URLs themselves, export them with the Sitemap URL Extractor; to see whether a page's own links answer, use the Broken Link Checker on that page.
Technical notes
The rules are those of the sitemaps.org protocol 0.9: a urlset (or sitemapindex) root in the http://www.sitemaps.org/schemas/sitemap/0.9 namespace, one url (or sitemap) element per entry with a required loc, optional lastmod, changefreq and priority, at most 50,000 entries and 52,428,800 bytes per uncompressed file, and URLs limited to the sitemap's own host and directory unless robots.txt cross-submits it.
lastmod is checked as W3C Datetime (the ISO 8601 profile the protocol names): YYYY, YYYY-MM, YYYY-MM-DD, or a date and time that must carry Z or an offset such as +03:00. Invalid calendar dates are errors; a date more than a day in the future is a warning.
The scan is a single linear pass, not a full XML parser: it checks what search engines need (tags close in order, entities are escaped, the root and namespace are right) but does not validate against the XSD or resolve DTDs.
Limitations and methodology
Fetched sitemaps are read up to 512 KiB, roughly 3,000–5,000 URLs; pasted XML is limited to the 2 MB every tool field accepts. Full-size 50 MB files cannot be validated here in one piece.
The fetch comes from the Mutqan server on Cloudflare's network with the fixed Mutqan User-Agent. A server that blocks unknown clients or serves crawlers a different file will answer differently than to a search engine.
It checks the protocol, not the content: it does not request the listed pages, compare lastmod with the pages' real changes, validate image or video extension tags in depth, or decompress gzip.
Security and privacy
Validation always runs in your browser. Pasted XML never leaves it; for a sitemap URL, that URL is the only thing sent to the Mutqan server, which downloads the file (up to 512 KiB) and hands it back without keeping a copy.
The request to the site carries a fixed header set and none of your cookies or credentials.
References
- sitemaps.org - ProtocolThe Sitemap protocol 0.9: the urlset and sitemapindex formats, loc, lastmod, changefreq and priority, the 50,000-URL and 50 MB limits, entity escaping, the location rules and cross-submission through robots.txt.
- Build and Submit a SitemapHow Google reads sitemaps: the supported formats and size limits, absolute URLs, lastmod used only when consistently accurate, and changefreq and priority ignored.