Free SEO Tools

Sitemap Checker: XML Sitemap Validator

Validate an XML sitemap or sitemap index: XML errors, URL count, lastmod dates and the robots.txt Sitemap line, plus a sample of listed URLs checked for errors and noindex.

A sitemap should list only URLs you want indexed: pages that return 200, do not redirect, are not noindex and whose canonical points to themselves. This checker validates the file against the sitemap protocol, reads up to five child sitemaps of an index, checks that robots.txt points to it, and fetches an evenly spread sample of the listed URLs.

WordPress: /sitemap_index.xml with Yoast SEO or Rank Math, /wp-sitemap.xml without a plugin. The check takes up to 45 seconds.

Sitemap report

Enter a sitemap URL to validate it and spot-check the URLs it lists.

What the checker does, step by step

You give it one sitemap URL. It fetches the file, parses it in a single pass, and reports whether it is well-formed XML that follows the sitemap protocol. If the file is a sitemap index, it reads the first five child sitemaps in the order the index lists them and validates each one the same way.

Next it reads robots.txt on the sitemap’s host and looks for a Sitemap: line that points to the file you entered. Last, it takes every URL it read, picks ten of them spread evenly across the list (the first, the last and eight in between), and fetches each one the way a crawler would. For each sampled URL it records the status code, whether it redirected, whether it carries noindex in a meta robots tag or an X-Robots-Tag header, and where its canonical points.

Each file may be up to 5 MB and gets 10 seconds to arrive. A bigger file stops the check with “The response is too large for this free check.”; check one of its child sitemaps instead. Sample URLs are fetched three at a time, and the whole check stops at 45 seconds. A sample URL it could not reach in time is listed as “Not checked: the time limit was reached.”, so you know it was skipped rather than healthy.

What it does not do

  • It does not fetch every listed URL. Ten is a spot check; the sitemap URL extractor gives you the full list.
  • It refuses compressed .gz sitemaps. Enter the uncompressed address; WordPress and its SEO plugins serve plain XML.
  • It does not test whether robots.txt blocks the sitemap file itself, only whether robots.txt declares it.
  • It checks the core urlset and sitemapindex structure. Image, video and news extensions inside the file are parsed for well-formedness but not validated.

The rules a sitemap has to follow

The sitemaps.org protocol sets the format, and Google’s sitemap documentation adds how Google treats the optional fields. The checker turns each rule into an error, a warning or a note.

RuleSourceWhat the checker reports
At most 50,000 URLs per filesitemaps.org and Google. A sitemap index has the same cap: 50,000 child sitemaps.Error: “The limit is 50,000; split it and list the parts in a sitemap index.”
At most 50 MB uncompressed per filesitemaps.org and GoogleNot measured: this free check stops at 5 MB a file
Root element <urlset> or <sitemapindex>sitemaps.org, in the namespace http://www.sitemaps.org/schemas/sitemap/0.9Error if the root is anything else; warning if the xmlns attribute is missing
Well-formed XML, with & written as &amp;XML itself; sitemaps.org also requires UTF-8Error, with the line number of the first problem
Full URLs with http:// or https:// and a hostsitemaps.org; Google asks for fully qualified, absolute URLsError, quoting the first relative or broken <loc>
URLs on the sitemap’s own hostsitemaps.org; Google accepts other hosts when you have verified them in Search Console, or when each host’s robots.txt names the sitemapWarning, with an example off-host URL
lastmod in W3C Datetime formatsitemaps.orgWarning with the first bad value; a separate warning for dates more than a day in the future
changefreq and priorityOptional in the protocol; Google ignores both (as of October 2026)Informational note only

One rule the checker shows rather than flags: Google does not support a sitemap index inside another sitemap index. If one of the child files in the report is labelled Sitemap index instead of URL sitemap, its URLs are not counted, and Google will not follow it either. List the inner index’s children directly, or submit the inner index separately.

How to read the report

The headline has three states. “Sitemap has errors” means at least one file could not be fetched, or a file has an error-level problem such as broken XML. “Sitemap has warnings” means there are no errors, but robots.txt does not list this sitemap, at least one sampled URL failed, or a file has a warning-level problem. “Sitemap looks healthy” means none of those.

Sitemap is the final address after redirects; if yours redirected, the first file card says “… redirects here. Submit and list the final URL.” For an index, Child sitemaps shows how many it lists and how many were checked, and URLs listed counts only the files that were read. The robots.txt line reads Lists this sitemap, Does not list this sitemap or Could not read robots.txt, with the sitemaps robots.txt does declare shown underneath.

File checks has one card per file: its type, how many entries it holds, how many have a lastmod, and its findings, each marked as an error, a warning or a note. The sample table gives each URL its final status code and a plain verdict: OK, “Returns 404: remove it from the sitemap or fix the page.”, “Redirects to …: list the final URL instead.”, “noindex: a sitemap should list only indexable URLs.” or “Canonical points to …”.

The canonical comparison is strict. A canonical that differs from the fetched URL only by a trailing slash, by http versus https, or by www is reported, because the sitemap and the canonical then disagree about which version is real.

WordPress sitemaps: core versus your SEO plugin

Since WordPress 5.5, core serves its own sitemap index at /wp-sitemap.xml, with child files such as /wp-sitemap-posts-post-1.xml, /wp-sitemap-posts-page-1.xml, /wp-sitemap-taxonomies-category-1.xml and /wp-sitemap-users-1.xml. It has no settings screen and holds up to 2,000 URLs per file. Since WordPress 6.5 it adds lastmod to post entries, but not to category, tag or user entries. It switches itself off when “Discourage search engines from indexing this site” is ticked under Settings → Reading.

SEO plugins replace it with their own. Each one turns the core sitemap off while its own sitemap feature is on, and core’s comes back if you turn the plugin’s feature off. That last part catches people out: switch off Yoast’s sitemap to “simplify things” and /wp-sitemap.xml quietly starts serving again, while Search Console still holds /sitemap_index.xml.

GeneratorSitemap addressTurn it on or offLeave content out
WordPress core/wp-sitemap.xmlOn by default; off when search engines are discouraged, or with the wp_sitemaps_enabled filterCode only: the wp_sitemaps_post_types and wp_sitemaps_taxonomies filters
Yoast SEO/sitemap_index.xmlYoast SEO → Settings → Site features → XML sitemapsYoast SEO → Settings → Content types, or Categories & tags: turning off “Show … in search results” also noindexes them
Rank Math/sitemap_index.xmlRank Math SEO → Dashboard → Modules → SitemapRank Math SEO → Sitemap Settings → the tab for each post type or taxonomy → Include in Sitemap
SEOPress/sitemaps.xmlSEO → XML - HTML Sitemap → Enable XML SitemapSEO → XML - HTML Sitemap → Post Types and Taxonomies tabs

Menu paths as of October 2026. They move between major plugin versions.

When two sitemaps compete

The symptoms: the robots.txt line says Does not list this sitemap and shows a different file underneath, robots.txt declares two sitemaps from two generators, or Search Console still holds a sitemap from the SEO plugin you replaced, which now returns 404.

Two sitemaps are not an error in themselves. The trouble is drift: one drops a deleted post, the other keeps it, and the stale file sends Google to redirects and 404s long after the site moved on.

  1. 1.Open /sitemap_index.xml, /sitemaps.xml, /wp-sitemap.xml and /sitemap.xml on your site and note which load. Run each one that loads through this checker.
  2. 2.Keep one generator. If you use Yoast SEO, Rank Math or SEOPress, leave its sitemap on and core’s stays off by itself. Turn off any other sitemap module, such as Jetpack’s sitemaps or a standalone sitemap plugin.
  3. 3.Look in the web root, by FTP or your host’s file manager, for a static sitemap.xml left by an old plugin or exported from a desktop crawler. A real file on disk is served instead of WordPress, so it never updates. Delete it.
  4. 4.Fix robots.txt. WordPress and the SEO plugins write a virtual robots.txt, but a physical robots.txt file in the web root replaces it, and any Sitemap: line a plugin would add never appears. Edit the physical file, or delete it and use Yoast SEO → Tools → File editor or Rank Math SEO → General Settings → Edit robots.txt.
  5. 5.In Search Console, go to Indexing → Sitemaps, remove the sitemaps that no longer load, and submit the one that does.
  6. 6.Exclude sitemap URLs from page caching and CDN caching rules, so the file changes when your posts do.

XML errors, by message

Google may reject a file that is not well-formed, so XML errors come first. These are the messages this checker prints, with the WordPress cause behind each one most of the time.

MessageUsual WordPress causeFix
The XML declaration must be the very first thing in the file (line 2)A blank line or space printed before <?xml, usually from whitespace after a closing PHP tag in a theme’s functions.php or a plugin fileOn a staging copy, switch to a default theme and disable plugins one at a time until the error goes; remove the stray whitespace from that file
An unescaped “&” was foundA URL with a query string, or an image title with an ampersand, written raw by a custom sitemap templateWrite & as &amp; in the template, or update the plugin that builds the file
<urlset> is never closedThe output was cut off: PHP ran out of memory or time while building a large filePut fewer entries in each file (Rank Math: Links Per Sitemap), raise the PHP memory limit, or ask your host about timeouts
Text found outside the root elementA PHP warning or notice printed into the output, or a script injected after </urlset>Set WP_DEBUG_DISPLAY to false in wp-config.php on the live site and fix the warning; exclude the sitemap from code injection
The root element is neither <urlset> nor <sitemapindex>The address served an HTML page: the theme’s 404 page, a maintenance or login page, or a firewall challengeRe-save Settings → Permalinks to refresh rewrite rules, confirm the address, and allow the sitemap through your firewall

Re-run the check after each fix. The checker reports the first XML error it meets, so a file with two problems shows the second one only after you fix the first.

When sampled URLs fail

A failing sample URL is rarely a one-off. Sitemaps are generated from settings, so one bad URL in ten usually means a whole group is affected. Work out which group, then fix the setting rather than the page.

Redirects usually mean the sitemap is built from an old address. If the sample shows http:// URLs redirecting to https://, or example.com redirecting to www.example.com, check that Settings → General → WordPress Address and Site Address both use the final form, then clear the cache that holds the old sitemap. A redirect on one post usually comes from a forgotten rule in a redirect manager; remove the rule.

A 404 in the sitemap means the file lists a page that no longer exists. Plugin sitemaps drop deleted posts on their own, so a 404 usually points to a cached or static sitemap, or to a custom post type whose single pages are not public.

noindex in the sample means the sitemap and your robots settings disagree. A common WooCommerce case: WooCommerce marks the cart, checkout and my-account pages noindex, and a sitemap that lists every page can include them. Exclude those pages from the sitemap; in Yoast SEO, set “Allow search engines to show this Page in search results?” to No in the page’s Advanced tab, which removes it too.

A canonical pointing elsewhere means the sitemap asks Google to index a URL that names another URL as the real one. Either the sitemap lists the wrong version, such as the one without a trailing slash, or the page was merged into another and should leave the sitemap.

lastmod dates Google will trust

Google says it uses lastmod only when the value is consistently and verifiably accurate, for example when it matches the page’s real last change. It also says the date should reflect a significant update, such as a change to the main content, the structured data or the links, and not a copyright year rolling over. Once Google learns that a site’s dates are noise, it stops relying on them.

A lastmod not in W3C Datetime format is a warning, and so is a date more than a day ahead, often a time zone or server clock problem. A file with no lastmod, or with more than 20 URLs that all share one date, gets a note: dates stamped at generation time are likely ignored.

WordPress SEO plugins use each post’s modified date, which is accurate by default. It goes wrong when something touches every post at once: a bulk edit in the Posts screen, an import, or custom code that sets the sitemap date to the current time. If every date in your sitemap is the day you last ran a bulk action, that is why.

A date in the wrong format

Before: 2026-10-13 09:30

After: 2026-10-13T09:30:00+00:00

A space instead of T, and no time zone, breaks the W3C Datetime format. A plain date such as 2026-10-13 is also valid.

A day-first date

Before: 13/10/2026

After: 2026-10-13

Only year-month-day order is valid. This usually comes from a custom template that formats the date with the site’s display settings.

Worked example: a sitemap after a domain move

Illustrative values. A Rank Math site moved from a staging host to www.example.com and switched to HTTPS the same week. The owner submits https://www.example.com/sitemap_index.xml in Search Console, which reports Has errors, and runs it through the checker.

File check on post-sitemap.xml (illustrative)

URL sitemap · 186 URLs · 186 with lastmod. Warning: 186 URLs are on a different host from the sitemap, e.g. https://staging.example.com/blue-mug-care/.

Every post URL still points at staging. Rank Math builds URLs from the WordPress Address, so either Settings → General still names the old host or a cache is serving the old file.

Sample row (illustrative)

http://www.example.com/about/ · 200 · Redirects to https://www.example.com/about/: list the final URL instead.

The page sitemap was generated before the HTTPS switch. Same cause, different file.

robots.txt line (illustrative)

Does not list this sitemap. Sitemaps robots.txt declares: https://staging.example.com/sitemap_index.xml

A physical robots.txt was copied over from staging. Rank Math’s editor cannot change it while the file exists.

The fix took three changes: both addresses in Settings → General set to https://www.example.com, the page cache purged, and the staging Sitemap: line replaced in robots.txt. The re-run showed Sitemap looks healthy, and the owner resubmitted the index in Search Console.

Confirming the fix in Search Console

In Search Console, open Indexing → Sitemaps. Submit the final sitemap address, exactly as this checker shows it after redirects. The status column reads Success, Has errors or Couldn’t fetch. Has errors means Google read the file but some of it failed; Couldn’t fetch means it could not load the file at all.

Click a sitemap to see its details, then See page indexing. That opens the Page indexing report filtered to the URLs that sitemap lists, which is the full-site version of this checker’s sample. The statuses Page with redirect, Excluded by ‘noindex’ tag, Not found (404) and Alternate page with proper canonical tag are the same four problems the sample looks for. After a fix, those counts should fall over the following weeks as Google recrawls.

For a single URL, URL Inspection shows under Discovery which sitemaps list it. Google retired its sitemap ping endpoint in 2023, so as of October 2026 the ways to tell Google about a sitemap are the Sitemaps report, the Search Console API and a Sitemap: line in robots.txt. Resubmitting does not force a recrawl; it tells Google the file is there.

When a warning is not worth acting on

If you checked a child sitemap such as post-sitemap.xml and robots.txt lists the index above it, Does not list this sitemap is expected. Google finds the child through the index.

Off-host URLs are fine when they are deliberate: a sitemap hosted on one of your domains that lists URLs on another, with both verified in Search Console. The checker cannot see your verification, so it warns anyway.

The notes are not problems. A single sample URL that timed out or returned a 5xx once may be a slow server rather than a sitemap fault; run the check again before you change anything.

You may not need a sitemap at all. Google says a site of roughly 500 pages or fewer that is well linked internally, without many media files, can do without one. Every WordPress SEO plugin makes one anyway, so aim for a clean one, not a bigger one.

FAQ about the Sitemap Checker

Where is my WordPress sitemap?

WordPress itself serves one at /wp-sitemap.xml. Yoast SEO and Rank Math replace it with their own at /sitemap_index.xml, and SEOPress uses /sitemaps.xml. Not sure which you have? Look for a Sitemap: line in your robots.txt, or try each address.

Why check a sample instead of every URL?

Checking every URL in a large sitemap takes thousands of requests. Ten URLs spread from the start to the end of the list usually show whether it lists redirects, noindexed pages or deleted pages, because those come from a site-wide setting far more often than from one page. For the full list, use the sitemap URL extractor.

Do changefreq and priority matter?

Not to Google, which ignores both as of October 2026. They do no harm. lastmod is the optional field Google uses, and only when the dates are accurate.

Do I need a Sitemap line in robots.txt if I submitted the sitemap in Search Console?

Not for Google, which accepts either. The robots.txt line still helps: other search engines and tools read it, and it keeps working if your Search Console property changes. Use both.

Why does Search Console say Couldn’t fetch when the sitemap opens in my browser?

Google’s help lists these causes: robots.txt disallows the sitemap path, the address is wrong (a 404), the site has a manual action, another fetch error such as a firewall or security plugin that blocks Googlebot but not you, or low crawl demand for the sitemap. If this checker reads the file, the format is not the problem.

How many URLs can one sitemap hold?

Up to 50,000 URLs and 50 MB uncompressed. WordPress generators split well below that: core at 2,000 URLs per file, Yoast SEO at 1,000 by default and Rank Math at 200 by default, all listed in one sitemap index.

Should category, tag and author sitemaps be included?

Only if those archive pages are indexable and worth finding in search. If you noindex tag or author archives, take them out of the sitemap too; in Yoast SEO turning off search visibility for a taxonomy does both. A sitemap that lists noindexed pages sends Google mixed signals.

Does submitting a sitemap get my pages indexed?

No. It helps Google discover URLs and notice changes, but Google decides what to crawl and index. Pages that are thin, duplicated or blocked stay out whether or not they are listed.