XML Sitemap Validator and Checker
Enter your site URL to validate its sitemap and spot-check the pages it lists.
An XML sitemap lists the pages you want search engines to crawl and index. It guarantees nothing, but a broken one wastes the hint: invalid XML can be rejected outright, and a sitemap full of redirects, 404s and noindex pages sends mixed signals about which URLs you actually want indexed.
This sitemap validator finds your sitemap through robots.txt, /sitemap.xml or a sitemap index, validates the XML and the protocol limits of 50,000 URLs and 50 MB, checks lastmod dates and hreflang alternates, then status-checks a sample of 25 listed URLs for 404s, redirects and noindex tags.
How to validate your sitemap
Enter your site URL
We look in robots.txt and at /sitemap.xml, and follow sitemap index files to the sitemaps they list.
Review the validation results
See XML errors, URL counts and size against the limits, lastmod problems and hreflang issues.
Fix the sampled URLs
Remove or replace listed URLs that return errors, redirect or carry noindex, then regenerate the sitemap.
What a valid sitemap looks like
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.com/boots</loc>
<lastmod>2026-10-28</lastmod>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/boots"/>
<xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/bottes"/>
</url>
</urlset>
- URLs must be absolute and canonical, on the same host as the sitemap unless you have verified cross-site submission.
- Special characters must be entity-escaped: an
&in a URL becomes&. - One file holds at most 50,000 URLs and 50 MB uncompressed. Larger sites split their URLs across several files listed in a sitemap index.
- The file must be UTF-8 encoded, and hreflang alternates must list every language version, including the URL itself.
The full format is on sitemaps.org, and Google’s own rules are in Build and submit a sitemap. Our XML sitemap entry covers the basics.
lastmod, priority and changefreq
Google ignores <priority> and <changefreq>. It uses <lastmod> only when the value is consistently and verifiably accurate, so:
- Use W3C Datetime format:
2026-10-28or2026-10-28T09:30:00+00:00. - Change lastmod when the main content changes, not when a footer year, a sidebar widget or a timestamp updates.
- Never stamp every URL with today’s date on each build; that turns the value into noise.
The validator reads the lastmod values it finds, so format problems surface before Google sees them.
Sitemap index files and common XML errors
Sites with many URLs, or several content types, use a sitemap index that points to child sitemaps. The validator follows it to the files it lists:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
<lastmod>2026-10-28</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-articles.xml</loc>
</sitemap>
</sitemapindex>
Most XML failures come from a handful of causes:
- Whitespace, a PHP notice or a stray character printed before
<?xml, which makes the whole file invalid. - An unescaped
&in a URL with query parameters. - A misspelled or missing namespace on
<urlset>. - An HTML error or login page served at the sitemap address instead of XML.
- URLs from a staging domain, or
http://URLs on an HTTPS site.
What should — and shouldn’t — be listed
A sitemap should list only URLs you want in search results: canonical, indexable pages that return 200. That is why the validator status-checks a sample of 25 listed URLs:
| Sampled URL returns | What it means | Fix |
|---|---|---|
| 404 or 410 | A deleted page is still listed | Remove it, or restore the page if it should exist |
| 301 or 302 | An old URL is listed instead of the final one | List the destination URL |
| 200 with noindex | Mixed signals: “index this” and “don’t” | Drop it from the sitemap, or remove the noindex |
The same logic applies to canonicals: if a listed URL names a different page as canonical, list that canonical URL instead.
Submit the sitemap in Search Console and reference it in robots.txt with a Sitemap: line; Google retired its sitemap “ping” endpoint in 2023. For Bing and other engines that support IndexNow, the IndexNow submitter notifies them of changed URLs right away.
Tips for a healthy sitemap
- Generate the sitemap automatically from your CMS or build, so new pages appear and deleted ones disappear without manual edits.
- Split large sites by type — products, categories, articles — so Search Console shows indexing problems per section.
- Gzip big sitemaps if you like; the 50 MB limit applies to the uncompressed file.
- If your sitemap lives at an unusual path, list it in robots.txt so search engines and tools can find it.
- Re-check the sitemap after every migration or URL change; old URLs left in it are a common source of redirect warnings.
Limits to keep in mind
The validator checks a sample of 25 listed URLs, not every one, so a clean sample doesn’t prove the whole file is clean. It finds sitemaps through robots.txt, /sitemap.xml or a sitemap index. It can’t tell which listed URLs Google has actually indexed — Search Console’s Sitemaps and Page indexing reports do that. Need a new file? The sitemap generator crawls up to 300 pages; to diagnose a single URL, use the indexability checker.
Last updated Oct 30, 2026 by the Yes SEO team.
Sitemap Validator: frequently asked questions
How do I check if my sitemap is valid?
Enter your site URL. The validator locates the sitemap, checks the XML and protocol limits, reviews lastmod and hreflang entries and tests a sample of listed URLs, then lists each problem with a fix.
How many URLs can a sitemap contain?
Up to 50,000 URLs and 50 MB uncompressed per file. Larger sites split their URLs across several sitemaps listed in a sitemap index file.
Does Google use priority and changefreq?
No. Google ignores both. It uses lastmod when the dates are consistently accurate, so keep lastmod honest and don’t bother tuning priority.
Should noindex pages be in my sitemap?
No. A sitemap should list only canonical, indexable pages that return 200. Including noindex or redirected URLs sends mixed signals.
Where should my sitemap be located?
Usually at the site root, such as /sitemap.xml, because a sitemap only covers URLs in its own folder and below. Reference it in robots.txt and submit it in Search Console.
Does a sitemap guarantee indexing?
No. It helps search engines discover URLs, but each page still has to be crawlable, indexable and worth indexing.