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.
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.
The most common sitemap errors and how to fix them
These problems account for most of what the validator finds on real sites.
| Message | What causes it | How to fix it |
|---|---|---|
| Invalid XML | An 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 namespace | The 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 host | A sitemap lists URLs from another domain, subdomain or protocol. | Only list URLs from the host and protocol the sitemap is served from. |
| Invalid lastmod | Dates 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 redirects | Deleted or moved pages left in the sitemap. | Remove them, or list the final destination URL. |
| URL is noindex or blocked | Pages 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 URLs | More than 50,000 URLs or 50 MB in one file. | Split into several sitemaps and list them in a sitemap index. |
Required fields for image, video, news and hreflang sitemaps
Google reads extra tags inside a sitemap. The validator checks the fields each one needs.
| Extension | Required | Good to know |
|---|---|---|
Image (image:image) | image:loc | Up 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_loc | Duration must be between 1 and 28,800 seconds. |
News (news:news) | publication name and language, publication_date, title | Only articles from the last two days, with at most 1,000 per sitemap. |
hreflang (xhtml:link) | rel="alternate", hreflang and href | Each page must list itself and every alternate, and every alternate must link back. |
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.
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 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.
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.
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
xmlnsaddress that tells a reader which vocabulary the tags belong to. The sitemap namespace ishttp://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 as2026-10-14or2026-10-14T09:30:00+05:45. Formats like14/10/2026are not valid. - Sitemap extension
- Extra tags inside a
urlentry for images, video, news or localised versions. Each has required fields, such asimage:locfor 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.
Related tools, guides and services
Validation tells you what is wrong. These tools and guides help you fix it and keep it fixed.
XML Sitemap Generator
Rebuild a clean sitemap from a crawl or URL list once you know what to remove.
ToolHreflang Checker
Check language and region annotations in a page or sitemap in more detail.
ToolCanonical URL Checker
Confirm the URLs in your sitemap match the canonical each page declares.
ToolHTTP Status Code Checker
Test every URL in a list for 200, 301, 404 and server errors in bulk.
GuidePages not indexed? Causes and fixes
Use it when valid sitemap URLs still do not appear in Google.
ServiceSEO audit service
Get sitemaps, indexing and the rest of your technical setup checked in one prioritised audit.
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
More free SEO tools
Crawling and indexing are connected: use these tools together to keep search engines pointed at the right pages.