Skip to content
MrKeyword
Free XML sitemap validator

XML sitemap validator: check your sitemap for errors

Enter your domain or a sitemap’s address. MrKeyword finds the sitemap through robots.txt, checks that the XML parses, counts the URLs and names every problem it finds: broken or relative URLs, other hosts, duplicates and bad <lastmod> dates. It then fetches 20 of the listed URLs live.

Free, no account needed. MrKeyword fetches the page live and shows only what it found.

Built on first-party data from Google and Bing
Search ConsolePageSpeed InsightsBing Webmaster Tools
An explorer discovering useful search ideas with a magnifying glass
A little curiosity goes a long way.
What it checks

What does an XML sitemap validator check?

An XML sitemap validator reads the sitemap search engines read and tells you whether they can use it: whether the file loads and parses as XML, how many URLs it lists, and which entries break the sitemap rules or point at pages that should not be there.

Enter a bare domain and the validator reads the Sitemap: line in robots.txt, or tries /sitemap.xml when there is none. Enter any other address and it is read as the sitemap itself, gzip included. A sitemap index is followed into its first five child sitemaps.

Every listed URL is checked for format (absolute http or https, no #fragment), host, duplicates and <lastmod> dates that are invalid or in the future. Then 20 URLs, spread across the file, are fetched live and any that answer with an error, a redirect or a noindex are named. The problems use the same names and fixes as the sitemap check in MrKeyword’s site audit, which reads every file and every URL.

In the result

Clear answers,
with the reason shown.

The file

Does the sitemap load and parse?

HTTP status, sitemap or sitemap index, gzip, the XML error and its line, the 50,000-URL and 50 MB limits, and child sitemaps that fail or sit on another host.

  • URL count from the file itself
  • Up to 5 child sitemaps opened
The URLs

Should every listed URL be there?

Relative, malformed and other-host URLs, duplicates, invalid or future lastmod dates, and 20 URLs fetched live for errors, redirects and noindex.

  • Each problem named, with examples
  • The fix for each one
Worked example

A sitemap index with five URLs that shouldn’t be there.

The fictional northwind-plumbing.example names /sitemap_index.xml in its robots.txt. The index lists two sitemaps, one for pages and one for blog posts, ten URLs in all. Entering the bare domain northwind-plumbing.example gives:

https://northwind-plumbing.example/sitemap_index.xml1 problem
  • Note10 URLs in 2 sitemap files; 9 sampled live.
  • ProblemBroken URLs in the sitemap (4xx, 5xx, failed): 1
  • FixEntries that are not absolute http(s) URLs: 1
  • Fix<lastmod> dates in the future: 1
  • FixRedirecting URLs in the sitemap (3xx): 1
  • FixNoindex URLs in the sitemap: 1

https://northwind-plumbing.example/sitemap_index.xml · found in robots.txt · Sitemap index

2 files10 URLs5 problems

Broken URLs in the sitemap (4xx, 5xx, failed) Critical

1 found. Remove these URLs from the sitemap, or restore the pages.

  • https://northwind-plumbing.example/spring-offer-2024 HTTP 404

Entries that are not absolute http(s) URLs Warning

1 found. Every <loc> must be a full URL such as https://example.com/page.

  • /blog/draft-radiator-guide Relative URL

<lastmod> dates in the future Warning

1 found. Set lastmod to when the page content really last changed.

  • https://northwind-plumbing.example/contact 2062-03-14

Redirecting URLs in the sitemap (3xx) Warning

1 found. List the final URL each one redirects to instead.

  • https://northwind-plumbing.example/blog/old-boiler-guide HTTP 301 → https://northwind-plumbing.example/blog/boiler-guide

Noindex URLs in the sitemap Warning

1 found. Remove noindex pages from the sitemap, or remove the noindex if they should rank.

  • https://northwind-plumbing.example/blog/tag/boilers noindex
9 listed URLs fetched live (spread across the sitemap)
StatusURLResult
200https://northwind-plumbing.example/OK
200https://northwind-plumbing.example/services/OK
200https://northwind-plumbing.example/boiler-repairOK
404https://northwind-plumbing.example/spring-offer-2024HTTP 404Broken
200https://northwind-plumbing.example/contactOK
200https://northwind-plumbing.example/blog/OK
200https://northwind-plumbing.example/blog/boiler-pressureOK
301https://northwind-plumbing.example/blog/old-boiler-guideHTTP 301 → https://northwind-plumbing.example/blog/boiler-guideRedirect
200https://northwind-plumbing.example/blog/tag/boilersnoindexNoindex
Sitemap files read (3)
  • https://northwind-plumbing.example/sitemap_index.xml HTTP 200 · index of 2
  • https://northwind-plumbing.example/sitemap-pages.xml HTTP 200 · 5 URLs
  • https://northwind-plumbing.example/sitemap-posts.xml HTTP 200 · 5 URLs

Example result for a fictional website (northwind-plumbing.example). It is produced by the checker's own code from the setup described above; run the checker for your own pages.

The XML of all three files parses, so search engines can read the sitemap, but half of what it asks them to crawl is wasted. The 2024 offer page was deleted (404): take it out. The old boiler guide redirects, so list /blog/boiler-guide, the address it lands on. The tag page carries a noindex tag, so it asks to be crawled and then refuses to be indexed: drop it from the sitemap. The draft post is listed as a relative path, which is not a valid <loc>; it needs the full https:// address, or no entry at all if it isn’t published. And the contact page’s <lastmod> says 2062, a typo for 2026; a future date is one reason search engines stop trusting a site’s lastmod. Our guide to doing an SEO audit shows where the sitemap fits in a full check, and the site audit reads every sitemap file and every URL, not a sample.

Reading the result

How do you read the sitemap validator result?

The summary row
How many sitemap files were read (for an index, the child sitemaps opened, up to five), how many URLs they list, and how many problems were found. The URL count comes from the files themselves.
Problems
Each problem has the same name and fix as the sitemap check in MrKeyword’s site audit, with up to ten examples. Critical problems stop a sitemap or a URL from being used; warnings waste crawling or send mixed signals; notices are worth tidying.
The live sample
Twenty listed URLs, spread evenly across the sitemap, fetched without following redirects, within 20 seconds. OK means HTTP 200 with no noindex; redirects, errors, noindex pages and a canonical that points elsewhere are named.
Not checked
A URL the 20-second limit left out, or one whose server asked us to slow down. It is not a problem with the URL; the full site audit checks those too.
Common errors

What are the most common sitemap errors, and how do you fix them?

A sitemap that is really an HTML page

Some sites answer /sitemap.xml with their 404 page or home page and HTTP 200. Search engines can’t use it; the validator flags it as an HTML page, not a sitemap.

Unescaped & in URLs

An & in a query string must be written &amp; inside the XML, or the whole file fails to parse. The validator shows the line.

Relative or http:// URLs

Every <loc> needs the full address with the protocol and host the site really uses. Relative paths are invalid, and http:// or www variants on an https site point at redirects.

Redirected and noindex pages left in

Plugins often list tag pages, old slugs and pages set to noindex. List only canonical URLs that answer 200 and should rank.

Lastmod set to today on every URL

A lastmod that changes when the page doesn’t, or that sits in the future, teaches Google and Bing to ignore it. Use the date the content really changed.

When to check

When should you validate your sitemap?

Check it whenever the way the sitemap is made changes, and whenever pages are found but not indexed.

After a site migration or redesign
Old URLs left in the sitemap now redirect or answer 404. The live sample shows them.
After changing SEO plugin or CMS
A new plugin can move the sitemap, change it to an index, or start listing tag and attachment pages.
Before submitting it to Google and Bing
Submit a sitemap that parses and lists only good URLs, then watch its report in Search Console and Bing Webmaster Tools.
When Search Console reports a sitemap error
“Couldn’t fetch” or “Sitemap could not be read” usually means an error status, an HTML page or broken XML; the validator names which.
When new pages are slow to be indexed
Check that they are listed, with an accurate lastmod, and that the sitemap isn’t full of redirects and noindex pages.
Go further

Guides for this check.

More free checkers

Other quick checks.

Questions

About the sitemap validator.

How many URLs can one sitemap have?

Up to 50,000 URLs, and no more than 50 MB uncompressed. A bigger site splits its URLs across several sitemaps and lists them in a sitemap index. Gzip saves bandwidth, but the 50 MB limit applies to the file once decompressed.

Does lastmod matter?

Yes, when it is accurate. Google uses lastmod if it is consistently and verifiably accurate, and ignores priority and changefreq. Bing also uses lastmod to decide what to recrawl, and an accurate date matters as much if you send changed URLs through IndexNow. A lastmod that changes when the page does not, or a date in the future, teaches search engines to ignore it.

What is the difference between a sitemap index and a sitemap?

A sitemap (a urlset file) lists page URLs. A sitemap index (a sitemapindex file) lists other sitemap files, so you can submit one address for many files. An index can list up to 50,000 sitemaps, but it can’t list another index: search engines don’t follow nested indexes.

Should redirected or noindex URLs be in a sitemap?

No. List only the canonical URLs you want indexed, each answering HTTP 200. A redirecting URL should be replaced with the address it redirects to, and a noindex page sends a mixed signal: you ask search engines to crawl it, then tell them not to index it.

How do I submit a sitemap to Google and Bing?

Add a line such as Sitemap: https://yoursite.com/sitemap.xml to robots.txt, which every search engine reads. Then submit the same address in Google Search Console (Indexing, then Sitemaps) and in Bing Webmaster Tools (Sitemaps, then Submit sitemap). Google retired its sitemap ping in 2023. Our Bing Webmaster Tools guide walks through the Bing side, IndexNow included.