Free tool ยท No sign-up

XML Sitemap Validator

Check a sitemap by URL, by pasting XML or by uploading a file. We validate the XML, the sitemap protocol and every URL, then test a sample of the URLs for redirects, errors, noindex and robots.txt blocks.

  • Sitemap index and .gz files supported
  • Image, video, news and hreflang sitemaps
  • Live status check of your URLs

Need to build one? Use the XML Sitemap Generator or the CSV-to-Sitemap Converter.

How validation works

Four layers of sitemap checks

A sitemap can be valid XML and still be a bad sitemap. The validator keeps going until it has checked the file, the protocol, the URLs and the pages behind them.

1. The XML file

Well-formed XML, UTF-8 encoding, the right root element and namespace, size under 50 MB and no more than 50,000 URLs.

2. Every entry

Absolute URLs, no duplicates, the same host as the sitemap, valid lastmod dates, and legal changefreq and priority values.

3. Extensions

Image, video, news and hreflang tags are checked for the required fields and sensible values.

4. The live URLs

A sample of URLs is fetched to find redirects, errors, noindex pages, canonical mismatches and robots.txt blocks.

Fix it fast

The most common sitemap errors and how to fix them

These problems account for most of what the validator finds on real sites.

Common XML sitemap errors, what causes them and how to fix them
MessageWhat causes itHow to fix it
Invalid XMLAn unescaped & in a URL, an unclosed tag or a stray character before the XML declaration.Write & as & and let a generator build the file.
Missing or wrong namespaceThe urlset tag has no xmlns or uses the wrong address.Use xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" exactly.
URL on a different hostA sitemap lists URLs from another domain, subdomain or protocol.Only list URLs from the host and protocol the sitemap is served from.
Invalid lastmodDates like 14/10/2026 or 2026-10-14 09:30 with no time zone.Use 2026-10-14 or 2026-10-14T09:30:00+05:45.
URL returns 404 or redirectsDeleted or moved pages left in the sitemap.Remove them, or list the final destination URL.
URL is noindex or blockedPages the sitemap asks Google to index, but that tell it not to.Take them out of the sitemap, or remove the noindex or block.
Too many URLsMore than 50,000 URLs or 50 MB in one file.Split into several sitemaps and list them in a sitemap index.
Extension sitemaps

Required fields for image, video, news and hreflang sitemaps

Google reads extra tags inside a sitemap. The validator checks the fields each one needs.

Required fields for sitemap extensions
ExtensionRequiredGood to know
Image (image:image)image:locUp to 1,000 images per page URL. Other image tags are no longer used by Google.
Video (video:video)thumbnail_loc, title, description, and content_loc or player_locDuration must be between 1 and 28,800 seconds.
News (news:news)publication name and language, publication_date, titleOnly articles from the last two days, with at most 1,000 per sitemap.
hreflang (xhtml:link)rel="alternate", hreflang and hrefEach page must list itself and every alternate, and every alternate must link back.
Honest limits

What a sitemap validator can't tell you

A clean result means the file is well formed and the sampled URLs look healthy. It is not a guarantee of indexing.

A sitemap is a hint

Google decides what to crawl and index. A valid sitemap doesn't force either.

Status checks are a sample

The tool tests up to a few hundred URLs, picked evenly across the file. A full crawl is needed to check every URL.

Server responses only

Pages are fetched like a simple crawler would, without running JavaScript. A page that only works in a browser may be reported differently.

Rules change

The checks follow the sitemaps.org protocol and Google's documentation as of 2026. Google Search Console remains the final word.

Why validate

What an XML sitemap validator checks and why a valid file is not enough

A sitemap validator reads your sitemap and tests it against the rules in the sitemaps.org protocol and Google's sitemap documentation. That means checking that the XML is well formed, that the namespace and root element are right, that every loc is an absolute URL on the same host, and that dates follow the W3C datetime format.

A sitemap can pass all of that and still be a poor one. If it lists pages that redirect, return errors, carry noindex or are blocked by robots.txt, you are asking search engines to index pages that tell them not to. So this validator also fetches a sample of the listed URLs and reports what the server and the pages really say.

That is why a validator is different from a generator. A generator creates the file. A validator audits one that already exists, whether you made it, your CMS did or a plugin did. Passing it does not mean Google will index everything: Google treats a sitemap as a hint, and Search Console's Success status only means the file was processed without errors.

When to use it

When to validate a sitemap

Run it after any change to how your sitemap is made, and routinely on sites that change often.

Search Console reports an error

When the Sitemaps report shows Has errors or Couldn't fetch, the validator lists each problem with its location, so you can fix the file instead of guessing.

After a plugin or CMS change

Switching an SEO plugin, theme or platform can change which URLs a sitemap lists. Check the new file before you submit it, and again a week later.

During a migration

Confirm the sitemap holds only final URLs, not old ones that now redirect. Pages returning 404 or redirects are the first things to remove.

In a technical SEO audit

Check the sitemap against the live site. A file full of noindex or non-canonical URLs often points to a template or plugin setting that needs fixing.

Using image, video or news sitemaps

Extension tags have required fields and limits of their own. The validator checks them so rich media entries are not silently ignored.

Running hreflang in the sitemap

Each page must list itself and every alternate, and every alternate must link back. A check across the file catches missing return links that are hard to see by eye.

Common mistakes

Sitemap errors the validator finds and how to fix them

These are the problems that turn up most often, along with the practical fix for each.

Unescaped characters in URLs

What goes wrong: An ampersand in a query string, such as ?a=1&b=2, breaks the XML. The file is then rejected as invalid or partly unreadable.

The fix: Write & as & inside the file, or let a generator or your CMS build the XML so escaping is handled for you.

Missing or wrong namespace

What goes wrong: The urlset tag must declare the protocol namespace, and extension prefixes such as image: or xhtml: need their own declarations. Without them, crawlers cannot read the tags.

The fix: Use xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" on urlset, and add the extension namespaces for any extra tags you use.

URLs on another host or protocol

What goes wrong: A sitemap may only list URLs on its own host and protocol, with limited exceptions. Mixed http and https or www and non-www entries are flagged.

The fix: Make every loc match the host and protocol the sitemap is served from, and match your canonical tags.

Redirected, erroring or noindex pages

What goes wrong: These pages should not be in a sitemap. They waste the file's usefulness and, if blocked by robots.txt, cannot even be fetched.

The fix: Remove them, or list the final destination URL. For noindex or blocked pages, either remove them from the sitemap or change the page's settings.

A sitemap index that lists other indexes

What goes wrong: Google's Search Console documentation says an index cannot list other index files. A nested structure does not follow the rules, so it is not a safe way to organise a large site.

The fix: Flatten the structure so one index lists the individual sitemaps, and keep each file under 50,000 URLs and 50 MB.

Stale or unreliable lastmod values

What goes wrong: Dates in the wrong format are invalid. Dates that are always today's date make Google less likely to trust the field.

The fix: Use 2026-10-14 or a full timestamp with a timezone, and update the date only when the main content really changes.

Glossary

Sitemap validation terms explained

Well-formed XML
XML that follows the basic syntax rules: one root element, every tag closed, special characters escaped and valid UTF-8 encoding. A parser rejects it otherwise.
Namespace
The xmlns address that tells a reader which vocabulary the tags belong to. The sitemap namespace is http://www.sitemaps.org/schemas/sitemap/0.9.
Sitemap index
A file listing other sitemaps. Google allows up to 50,000 sitemaps per index, and an index can list only sitemap files, not other index files.
W3C datetime
The date format sitemaps use for lastmod, such as 2026-10-14 or 2026-10-14T09:30:00+05:45. Formats like 14/10/2026 are not valid.
Sitemap extension
Extra tags inside a url entry for images, video, news or localised versions. Each has required fields, such as image:loc for images.
Return link
In hreflang annotations, the reciprocal link from each alternate back to the page. Google may ignore annotations that lack return links.
Sitemap status in Search Console
The Sitemaps report shows Success, Has errors or Couldn't fetch. Success means the file was processed, not that its pages are indexed.
URL sample
A subset of the listed URLs the validator fetches to check status, redirects, noindex and canonicals. It shows patterns but is not a full crawl.
Madhav Kushwaha, SEO, AEO, GEO and digital marketing consultant in Kathmandu, Nepal

Built by

Madhav Kushwaha

SEO, AEO, GEO & Digital Marketing Consultant in Kathmandu, Nepal, and trainer at ODcrU Academy and TechAxis Institute. I built this validator because a sitemap full of redirects, errors and noindex pages quietly wastes crawl budget and makes Google trust the file less. It checks the XML and the URLs inside it, the way I do in a technical audit.

XML Sitemap Validator: Frequently Asked Questions

An XML sitemap validator reads a sitemap file and checks it against the XML standard and the sitemaps.org protocol. This one also checks every URL in the file and tests a sample of them on the live site, so it finds problems that make search engines distrust the sitemap.
Open the Check a URL tab and enter your sitemap address or just your domain, and the tool finds the sitemap from robots.txt. You can also paste the XML or upload the file. The report lists every problem with the line number and how to fix it.
One sitemap file can hold up to 50,000 URLs and be up to 50 MB uncompressed. A sitemap index can list up to 50,000 sitemaps. If you go over, split the sitemap into several files. Files must be UTF-8 encoded and URLs must be absolute.
No. Google ignores priority and changefreq. It uses loc and, when it is consistently accurate, lastmod. The validator still checks the values are legal and notes that they have no effect on Google.
The date a page was last meaningfully changed, in W3C datetime format, such as 2026-10-14 or 2026-10-14T09:30:00+05:45. Don't set every URL to today's date: Google learns to ignore lastmod when it isn't reliable.
A sitemap should list the canonical, indexable version of each page. Redirected, 404 and noindex URLs waste crawl budget and make the sitemap look unreliable. The validator's status check finds them.
Yes. For a sitemap index, the tool fetches the child sitemaps (up to a limit you choose) and validates each one. Gzip-compressed sitemaps are unpacked automatically.
A sitemap may only list URLs from the host and protocol it is served from, with limited exceptions. A URL on another domain, a different subdomain, or http instead of https is flagged so you can fix or move it.
Yes, with the Paste code or Upload file tabs. Status checks need public URLs, so they are skipped for pasted files unless the URLs are already live.
It is free with no sign-up. Pasted or uploaded sitemaps are analysed in your browser. For URLs, the file and the sample pages are downloaded through small server functions and returned to your browser. Nothing is saved.

More free SEO tools

Crawling and indexing are connected: use these tools together to keep search engines pointed at the right pages.

Call WhatsApp SEO Audit