SEO

Sitemap Validator — XML, limits and URL quality

Check an XML sitemap for well-formedness, required elements, the protocol's size limits, and URLs that will not resolve as written.

Paste the raw XML. A sitemap index file works too — it is validated against the index rules instead.
Leave blank to use the most common host in the file as the reference.
Verdict
—
 
0
URLs found (limit 50,000)
0
Errors
0
Warnings
0 KB
Size (limit 50 MB)
Tip: a sitemap can be perfectly valid XML and still be useless. The warnings below are about URL quality — mixed protocols, alternate hosts, parameters — which is what actually decides whether the file helps crawling.

A sitemap validator checks two separate things that are easy to conflate: whether the file is a legal XML sitemap, and whether the URLs inside it are the ones you actually want crawled. The first is a parsing question with a definite answer. The second is a judgement about consistency — protocols, hostnames, parameters, duplicates — and it is where most real sitemaps fail, long after they have passed every syntax check. This page does both, entirely in your browser, with no request made to your site or to ours.

The second check matters most for sitemaps generated by a plugin, a framework or a build script rather than written by hand. Generators reliably produce well-formed XML but can list non-canonical URLs. A file can be flawless against the schema and still list thousands of pages on the wrong protocol, which sends crawlers through a redirect for every entry.

What This Sitemap Validator Does

Paste the XML and the tool parses it with the browser's own XML parser, so a malformed document fails where a standards-based XML parser would fail. The error text comes from your browser, so its wording and position detail vary between browsers. If it parses, the structural checks run: the root element must be urlset or sitemapindex, the sitemaps namespace should be declared on it, every <url> entry must contain exactly one <loc>, and every <sitemap> entry in an index must do the same. Missing, empty or duplicated <loc> elements are errors, not warnings, because an entry without a location has no meaning at all.

Then the limits. The protocol caps a single sitemap file at 50,000 URLs and 50 MB uncompressed, and both counters above show your position against those ceilings. The tool raises a warning above 45,000 entries or 45 MB, and an error above 50,000 entries or 50 MB (52,428,800 bytes). Size is measured as the UTF-8 bytes of the text you pasted.

Finally the URL quality pass, which is the part a schema check will never do. Each location is examined for an absolute form with a scheme and host, for protocol and host consistency against the rest of the file, for query strings and fragments, for duplicates, for excessive length, and for optional elements that are present but invalid — a priority outside 0.0 to 1.0, an unrecognised changefreq, or a lastmod that is not a valid W3C date. Every finding is listed with its entry number so you can go straight to it.

How to Use It

  1. Paste the raw XML. Open your sitemap in a browser, view source, and copy the whole document including the XML declaration.
  2. Optionally name your canonical host. Enter the hostname your site should be serving from. Leave it blank and the validator infers the reference host from whichever appears most often.
  3. Click Validate sitemap. The verdict is immediate: valid, valid with warnings, or the count of errors that must be fixed first.
  4. Work through errors before warnings. Errors are protocol violations that can invalidate the file. Warnings are URLs that are legal but probably not what you meant to submit.
  5. Re-validate after regenerating. Sitemap defects almost always come from the generator's configuration, so the fix belongs upstream rather than in the file.

What Is Checked, and Against What

The structural rules come from the sitemaps protocol itself, which is a small and unusually readable specification. It defines the namespace, the required <urlset> and <loc> elements, the optional <lastmod>, <changefreq> and <priority>, the character-escaping rules, and the two size limits. It is worth reading once in full — the whole thing is shorter than most blog posts about it, and it is published at sitemaps.org.

Escaping is the rule that catches hand-edited files most often. A raw ampersand in a URL is not valid XML, so ?a=1&b=2 must be written with the ampersand escaped. The browser's XML parser enforces that automatically, which is why an unescaped ampersand shows up here as a parse error rather than a warning: the document is not XML at all, and a crawler will reject the whole file rather than the one bad entry. The same applies to unescaped angle brackets and to whitespace or any other text before the XML declaration.

The URL rules are stricter than XML's. Every <loc> must be a fully qualified absolute URL beginning with a scheme — /pricing/ is not acceptable even though it is perfectly valid XML text, and neither is example.com/pricing/ without the protocol. The protocol also limits a sitemap to URLs on its own host, and to paths at or below the sitemap's own location, which is the rule behind the cross-host warnings this tool produces. The tool checks hosts and protocols but not the path scope, so check that yourself if the sitemap is not at the site root.

The 50,000 URL and 50 MB Limits

A single sitemap file may contain at most 50,000 URLs and must not exceed 50 MB uncompressed. Both limits bind independently: 20,000 URLs with long paths and full lastmod timestamps can approach the size ceiling well before the count ceiling. Gzip compression is allowed and encouraged for transfer, but the 50 MB limit applies to the uncompressed document, so compressing an oversized file does not make it legal.

The remedy for either limit is a sitemap index: a file whose root is <sitemapindex> and whose entries point at other sitemap files rather than at pages. An index may list at most 50,000 sitemaps, so a single index can cover up to 2.5 billion URLs, and you can have more than one index file. Splitting also has a diagnostic benefit that has nothing to do with the limits: if you split by section (products, blog posts, category pages), Search Console lets you filter its page indexing report by sitemap, so a section-wide problem is easier to see.

Google's own guidance on building and submitting sitemaps, including the index format and the submission methods, is documented in Google Search Central. Google accepts submission through Search Console, its API, or a Sitemap: line in robots.txt, and our robots.txt generator can write that line.

Relative and Non-Canonical URLs

This is the class of defect that survives every other check. A relative <loc> such as /about/ is well-formed XML, reads fine to a human, and is invalid to a crawler, which will not resolve it against the sitemap's own location. It usually appears when a template that was written for internal links gets reused by the sitemap generator, and it can affect every entry in the file at once.

Non-canonical URLs are subtler and more common. Listing http:// URLs on a site that redirects everything to https:// means every entry in your sitemap is a redirect, which wastes crawl requests and sends a contradictory signal about which version is authoritative. The same applies to www and non-www mixed in one file, to URLs with tracking or session parameters, to URLs with fragments after a hash — which are never separate documents to a crawler — and to inconsistent trailing slashes where both forms resolve. None of these break the file. All of them make it less useful.

The rule that resolves nearly all of it: a sitemap should list the canonical, final, 200-status URL of every page you want indexed, and nothing else. Not redirects, not parameter variants, not pages carrying a noindex directive, and not pages canonicalised to a different URL. If you are unsure how a particular URL decomposes into scheme, host, path and query, our URL parser breaks it apart, and the HTTP status code lookup explains what a crawler does with each response it might get instead of a 200.

lastmod Is the Field Most Often Wrong

The lastmod element must be a W3C datetime value: either a date such as 2026-08-01, or a date and time with a timezone offset such as 2026-08-01T09:15:00+00:00. This tool also accepts a bare year or year-month, which the format allows. Values like 01/08/2026, August 1 2026, or a Unix timestamp are flagged as errors. The check is a pattern match: it does not catch impossible dates such as 2026-13-45.

A correctly formatted lastmod can still be misleading, and that is the more expensive failure. Some content management systems update the value on every publish of any page, or on every build, so an entire sitemap reports today's date every morning. When that happens the field carries no information. Google's sitemap documentation says it uses the value if it is consistently and verifiably accurate. The discipline is simple: set lastmod only when the page's main content genuinely changed, and leave it alone for a comment count, a sidebar update, or a template change.

changefreq and priority deserve less attention than they get. The protocol describes both as hints, and Google states that it ignores both values. A file where every page carries priority 1.0 says nothing about relative importance. Validating them is still worthwhile — an out-of-range value is a sign that the generator is misconfigured in other ways too.

What a Validator Cannot Tell You

A clean report here means the file is legal and internally consistent. It does not mean the URLs work. This tool makes no network requests by design, so it cannot know whether a listed page returns 200, 301, 404 or 500, whether it carries a noindex tag, whether robots.txt blocks it, or whether its canonical tag points somewhere else entirely. Those checks require fetching each URL, and any tool that claims to do them from a pasted file is inferring rather than verifying.

That gap matters because the most common real-world sitemap problem is a conflict rather than a syntax error: a URL is listed in the sitemap, which says "index this", and simultaneously carries a noindex meta tag or a canonical pointing at another page, which says the opposite. A noindex page generally will not be indexed whatever the sitemap says, so the entry is wasted. Validate the file here, then verify a sample of the URLs themselves in Search Console's inspection tool. If crawl efficiency is your concern rather than syntax, our crawl budget calculator models how far a crawler gets through a site of a given size at a given rate.

Generating a Sitemap Versus Validating One

These are two different jobs and we publish a separate tool for each. Our XML sitemap generator creates a sitemap from a list of URLs you supply, complete with the namespace declaration and optional metadata. This page takes a sitemap that already exists — typically produced by your CMS, your framework, or that generator — and audits it. Use the generator when you need a file; use this one before you submit whatever file you have.

The two work well in sequence. Generate, validate, fix whatever the report names, then submit. For an international site, the sitemap is also one of the three valid places to declare alternate language versions, and our hreflang tag generator covers the reciprocity rules that markup has to satisfy before search engines will act on it.

Reading the Report on a Large File

On a sitemap with thousands of entries, the useful signal is the pattern, not the individual line. Fifty warnings about mixed protocols spread randomly through the file suggests content that was migrated at different times. Fifty consecutive warnings suggests one section of the site is generated by different code. Every entry warning at once almost always means a single template or configuration value is wrong, which is a one-line fix rather than thousands.

Because the whole check runs locally, pasting a large file is safe — nothing about your site structure leaves the browser, which matters when the sitemap belongs to a staging environment or an unlaunched section.

Want your technical SEO checked properly, not just your sitemap?

Arb Digital audits crawlability, indexation, canonical signals and site architecture, then fixes what is holding the site back. We cannot guarantee rankings.

SEO Services Talk To Our Team

Common Mistakes to Avoid

  • Listing redirecting URLs — an http:// entry on an HTTPS-only site makes every crawl request a redirect and muddies the canonical signal.
  • Including noindexed or canonicalised pages — the sitemap asks for indexing while the page refuses it, and the on-page directive wins every time.
  • Updating lastmod on every build — a file where every date is today teaches crawlers to ignore the field entirely.
  • Compressing an oversized sitemap instead of splitting it — the 50 MB limit applies uncompressed, so gzip does not buy you headroom.
  • Leaving relative paths in <loc> — every location must be absolute with a scheme and host, no matter how the rest of your templates write links.

How to Read the Result

  • "N errors" or "Invalid": fix these first. The parse failure message names what the browser could not read. Other errors name the entry number, so count entries from the top of the file.
  • "Valid, N warnings": the file is legal. Each warning names a URL-quality issue to confirm: a query string, a second host, mixed protocols, a duplicate, a fragment, or a very long URL.
  • "Valid": no syntax problems and no inconsistency found. It says nothing about whether the URLs return 200, so spot-check some in Search Console.
  • Host warnings compare each host with the one in the "expected canonical host" field, or with the most common host if it is blank. If the guessed host is wrong, fill the field in.

What to Do Next

  1. Fix the cause in the generator or CMS setting, not in the file, and regenerate.
  2. Re-validate until errors are zero and every remaining warning is intentional (an external file URL, for example, may be deliberate).
  3. Submit the sitemap in Search Console or reference it in robots.txt.
  4. Spot-check a sample of listed URLs for status 200, no noindex, and a self-referencing canonical.

Related Free Tools From Arb Digital

Build the file itself with the XML sitemap generator, declare it correctly with the robots.txt generator, decompose a problem URL with the URL parser, interpret crawler responses with the HTTP status code lookup, or plan crawl capacity with the crawl budget calculator. Everything we publish is listed in the free online tools hub.

Worked Example With the Default Sitemap

The box holds a five-entry sample for example.com with the host field blank. Clicking Validate returns:

  • Verdict: Valid, 3 warnings
  • URLs found: 5
  • Errors: 0
  • Warnings: 3
  • Size: 580 B

The three warnings are the sample's deliberate flaws: entry 4 has a query string (?q=shoes&page=2), entry 5 is on a different host (cdn.example.net, against the reference host example.com, which appears on four of the five URLs), and the file mixes https and http because entry 3 uses http://. Nothing is an error, because every entry is absolute, the dates are valid and the limits are nowhere near. Fixing entry 3 to HTTPS would clear the protocol warning. The query and cross-host warnings may be intentional, which is why they are warnings. These are sample numbers, not a benchmark.

Frequently Asked Questions

How many URLs can one sitemap file contain?

Up to 50,000, and the file must not exceed 50 MB uncompressed. If you need more, split the URLs across several files and list those files in a sitemap index, which may list up to 50,000 sitemaps.

Does gzip compression change the 50 MB limit?

No. The limit applies to the uncompressed document. Compression reduces transfer size and is encouraged, but an oversized sitemap has to be split rather than zipped.

Can a sitemap contain relative URLs?

No. Every loc element must be a fully qualified absolute URL including the scheme and host. A relative path is valid XML but invalid as a sitemap entry, and crawlers will not resolve it against the file's own location.

How is this different from the XML sitemap generator?

The generator creates a sitemap from a list of URLs you provide. This page validates a sitemap that already exists, checking well-formedness, required elements, the size limits and URL consistency before you submit it.

What date format does lastmod require?

A W3C datetime value: a date such as 2026-08-01, or a date and time with a timezone offset such as 2026-08-01T09:15:00+00:00. Slash-separated dates and written month names are invalid. This tool checks the pattern only, so it will not catch an impossible date.

Do changefreq and priority affect rankings?

Google says it ignores both values. They are validated here because the sitemap format defines them, and an out-of-range value suggests a misconfigured generator.

Does this tool check whether the URLs actually work?

No, and deliberately so. It makes no network requests, so it cannot see status codes, noindex tags or canonical conflicts. Validate the file here, then inspect a sample of the URLs themselves in Search Console.

Is my sitemap uploaded anywhere?

No. Parsing and validation both happen in your browser, which means pasting a staging or pre-launch sitemap does not expose your site structure to anyone.

Turn this result into a plan

Want a fuller picture of your own site? Run the free AI Website Audit for a page-by-page report.