Why a broken sitemap fails without warning
A broken sitemap does not announce itself. Pages keep loading and visitors keep arriving, but Google may be rejecting part or all of the file and falling back to whatever it finds through internal links. Search Console records the problem in the Sitemaps report, often as "Couldn't fetch" or as a success with far fewer discovered URLs than you expected, but nobody gets an email about it.
This sitemap validator, also called a sitemap checker, finds and loads your live sitemap, parses it, and reports what is wrong in plain language. You can paste a sitemap URL directly, or enter a homepage and it will look in robots.txt Sitemap: lines and common locations such as /sitemap.xml, /sitemap_index.xml and /wp-sitemap.xml. Gzipped files are decoded, and sitemap index files are followed to their child sitemaps.
The checks it runs on the file and the URLs
On the file itself, it confirms the XML loads as a sitemap or sitemap index, counts the URLs, and flags an empty urlset or a single file over the 50,000 URL limit. On the listed URLs, it checks that every loc is an absolute http or https address, flags URLs on a different domain from the sitemap, flags http/https mixes against the sitemap's own protocol, and counts duplicate URLs.
For lastmod, it reports values that are not in W3C date format, dates set in the future, and a sitemap with no lastmod at all. Then it goes past the XML: it requests the first ten URLs in the file and reports their real HTTP status, flagging any that fail to load or redirect. That spot check is where the most common real-world problem shows up, because a sitemap can be perfectly valid XML and still be full of URLs that should not be there.
The protocol in one example
The sitemap format comes from sitemaps.org, a protocol Google, Yahoo and Microsoft agreed to support in 2006. A valid file starts with an XML declaration, opens a urlset element with the sitemaps.org namespace, and lists each page in a url block. The loc element, the absolute URL, is the only required child. Here is a minimal file with the one escaping rule that breaks most hand-built sitemaps:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2025-03-14</lastmod>
</url>
<url>
<!-- & must be escaped as & inside <loc> -->
<loc>https://www.example.com/shoes?color=red&size=10</loc>
<lastmod>2025-03-02T09:30:00+00:00</lastmod>
</url>
</urlset>URLs must be properly escaped: an ampersand becomes &, and quotes and angle brackets need entities too. One raw ampersand and many parsers stop reading the file. A single sitemap holds up to 50,000 URLs and 50MB uncompressed; beyond that, split it into several files and list them in a sitemap index. The Sitemap Index Checker then confirms every child file loads.
URLs that should not be in the file
Passing an XML check is the low bar. Only final, canonical URLs that return 200 belong in a sitemap. Redirects mean the file still lists old addresses after a migration, so Google has to follow a hop for every one. 404s mean pages were deleted but the sitemap was never regenerated, which makes the whole file look less reliable.
Two other kinds of URL send mixed signals: pages with a noindex, and pages whose canonical points somewhere else. The sitemap says "index this", the page says "don't" or "index that one instead". This validator does not check noindex or canonical tags on each URL, so run important ones through the Indexability Checker, and check for robots.txt blocks across the whole file with the Robots.txt vs Sitemap Conflict Checker.
Host and protocol consistency is the last URL-level check. A sitemap on https that lists http URLs, or one on the bare domain that lists www URLs, is pointing Google at addresses that redirect. These never show up as XML errors, which is why the validator compares them for you.
Lastmod: the one optional field Google reads
Google uses lastmod to help schedule recrawls, but only when the dates are consistently accurate. The classic mistake is setting every URL's lastmod to the build time, so after each deploy the whole site claims it changed today. Google learns to ignore the field for that site.
The right value is the last time the main content of that page meaningfully changed: new text, a corrected fact, an updated price. A site-wide footer change does not count. Use YYYY-MM-DD or a full ISO 8601 timestamp with a time zone, and never a future date.
Changefreq and priority can be dropped
The protocol also defines changefreq (always through never) and priority (0.0 to 1.0). Google's documentation states that it ignores both, so they have no effect on crawling or rankings there. Other engines may read them, but an accurate lastmod and strong internal linking do far more.
Image, video and news extensions
Google supports three sitemap extensions. A news sitemap (for publishers in Google News) should list only articles from the last two days, up to 1,000 URLs per file. The image extension lists image locations for a page, up to 1,000 per URL; Google now reads only the image:loc tag, having dropped the caption, title, geo location and license tags in 2022. The video extension describes a video's thumbnail, title, description and file or player URL, which helps Google find videos it might otherwise miss, though VideoObject structured data on the page does the same job.
Fixing sitemap errors on your platform
WordPress
WordPress core serves /wp-sitemap.xml, and Yoast or Rank Math replace it with /sitemap_index.xml. If redirects or deleted pages appear, the plugin is usually including a post type or taxonomy it should not; exclude it in the plugin's sitemap settings rather than editing the XML.
Shopify
Shopify generates /sitemap.xml automatically and keeps it updated. Problems usually come from redirected products or hidden pages; fix the product or redirect in the admin and the sitemap follows.
Custom builds
Generate the file from your database of published, canonical URLs, escape every loc, store a real content-updated date per page, and serve it with a 200 status and an XML content type.
Submitting, monitoring and reading Search Console
Once the file validates, submit it in Google Search Console under Sitemaps using its full URL, add the same file in Bing Webmaster Tools, and list it in robots.txt with a Sitemap: line. Processing can take hours to days.
Then use the Page indexing report. "Discovered - currently not indexed" means Google knows the URL but has not crawled it yet; "Crawled - currently not indexed" means it fetched the page and chose not to index it. Neither is usually a sitemap problem. Internal links, server speed and page quality are the usual levers, as our XML sitemap guide explains. A clean sitemap will not rank you, but a broken one quietly limits how much of your site Google sees.