Skip to main content

XML Sitemap Validator

Check a sitemap, sitemap index, or whole site by URL or file against the protocol and Google’s rules, and download fixed sitemaps.

  • Free
  • No sign-up
  • Checks live URLs
  • Updated

Files you add are checked in this browser. Sitemaps checked by URL are downloaded for you and never stored.

Your sitemap

Enter a sitemap, or just your domain to find sitemaps through robots.txt. Sitemap index files are followed to the sitemaps they list.

Compare with a crawl

Optional

Add a crawl export with status codes, indexability, and canonicals, such as Screaming Frog’s Internal tab (.csv or .xlsx), to find listed URLs that redirect, return errors, are noindex, or point to another canonical, and indexable pages your sitemaps leave out.

How useful was this tool?

Your rating helps other users find the right tool.

How to use the XML Sitemap Validator

  1. Add your sitemap

    Enter a sitemap address or your domain, or upload or paste the files.

  2. Add a crawl

    Optionally, add a crawl export to check the status and indexability of every listed URL.

  3. Fix the errors

    Select each issue type to see every URL it affects, the reason, and the fix.

  4. Download the fix

    Download the fixed sitemaps, upload them, and submit them in Search Console.

Example: a small sitemap with four common mistakes

Checked as https://www.example.com/sitemap.xml.

Sitemap XML
<?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>2026-10-01</lastmod></url>
  <url><loc>/about/</loc></url>
  <url><loc>http://www.example.com/blog/</loc><lastmod>01/10/2026</lastmod></url>
  <url><loc>https://www.example.com/</loc><priority>0.8</priority></url>
</urlset>
Issues found
Error: Not a full URL. /about/
Error: Invalid lastmod date. "01/10/2026" on http://www.example.com/blog/
Warning: URL outside the sitemap's site or folder. http://www.example.com/blog/ uses http, the sitemap uses https.
Warning: Duplicate URL. https://www.example.com/ is listed twice.
Notice: Uses priority and changefreq. Google ignores them.

Use full https:// URLs, write dates as YYYY-MM-DD, and list each URL once. The Fixed sitemap tab removes the relative URL, the invalid date, the duplicate, and the priority tag; change http to https at the source.

This XML sitemap validator checks a sitemap, a sitemap index, or a whole site’s sitemaps against the sitemaps.org protocol and Google’s rules, then writes a fixed copy you can upload. Enter a sitemap address or just your domain, and it reads robots.txt, follows the index to every sitemap it lists, and reports each error with the exact URL, the reason, and the fix. It covers XML errors, encoding, size limits, URLs on the wrong site, lastmod dates, image, video, and news tags, and, with a crawl export, URLs that redirect, return errors, or are noindex.

How to use the XML sitemap validator

  • Check a URL. Enter a sitemap address, such as https://www.example.com/sitemap.xml, or your domain. The XML sitemap validator finds sitemaps through robots.txt, or tries the usual addresses, and checks up to 100 sitemaps listed in an index.
  • Or upload files. Drop in .xml, .xml.gz, or .txt sitemaps, or paste the XML. Add every sitemap an index lists to check them together.
  • Add a crawl (optional). A crawl export with status codes, indexability, and canonicals, such as Screaming Frog’s Internal tab, shows which listed URLs shouldn’t be there and which indexable pages are missing.
  • Review the issues. Errors come first. Select an issue type to see every URL it affects, with the source of the rule.
  • Download the fix. The Fixed sitemap tab writes clean sitemaps, split into files of 50,000 URLs with an index when needed.
XML sitemap validator results for a sitemap index, with 9 errors including a sitemap that returns 404, text before the XML declaration, and an unescaped ampersand
The example site: a sitemap index with five sitemaps, checked through robots.txt, with every error listed by type.

What the sitemap validator checks

The sitemaps.org protocol defines the format, and Google’s guide to building and submitting a sitemap adds its own rules. The XML sitemap validator runs 59 checks in five groups:

GroupChecks
DownloadThe sitemap returns 200, redirects, its content type, and whether it’s really a web page such as a 404 page
XMLWell-formed XML, text before <?xml, unescaped &, UTF-8 encoding, the sitemaps.org namespace, and the root element
Limits50,000 URLs and 50 MB uncompressed per sitemap, 50,000 sitemaps per index, and URLs under 2,048 characters
URLsFull URLs, the same host, protocol, and folder as the sitemap, duplicates, http and www versions, fragments, tracking parameters, and characters to encode
Tagslastmod format and future dates, identical dates, priority and changefreq values, image, video, news, and hreflang tags, and deprecated tags

If you check by URL, the sitemap validator also reads robots.txt and tells you when a sitemap isn’t listed in a Sitemap: line.

Common sitemap errors and how to fix them

Text before the XML declaration

Nothing may come before <?xml, not even a blank line. The error often comes from a WordPress plugin or theme file with whitespace after its closing ?>, which adds a line break to every response, including the sitemap. The XML sitemap validator shows how many characters come first, so you know it’s this and not a broken file.

Unescaped ampersands

A URL such as /shoes?color=black&size=10 must be written with &amp; in XML. A raw ampersand stops the whole file from being read. The sitemap validator finds the line, and the fixed sitemap escapes every value.

URLs on the wrong site or in the wrong folder

A sitemap can list only URLs on its own host and protocol, at or below its folder. A sitemap at https://www.example.com/blog/sitemap.xml can’t list https://www.example.com/shop/, and a sitemap on www can’t list http:// URLs. Google says each sitemap should include only URLs from that site, unless you set up cross-site submission.

A sitemap that returns HTML

When a sitemap address is wrong, some sites return their home page or a 404 page with a 200 status. The XML sitemap validator recognizes HTML and reports it as a web page, not a sitemap.

lastmod dates that Google can trust

Fixed sitemap options in the XML sitemap validator, removing priority and changefreq, invalid lastmod dates, and URLs that do not return 200, with a list of the fixed files
The Fixed sitemap tab lists every change it makes and the files you’ll download.

Google uses <lastmod> if it’s consistently and verifiably accurate, and ignores <priority> and <changefreq>. lastmod should be the date of the last significant change to the page; an updated copyright date doesn’t count. The XML sitemap validator checks every date against the W3C Datetime format, flags dates in the future, and warns when most URLs share one date and time, which is usually when the sitemap was generated rather than when pages changed. The Last modified dates tab charts URLs by month, so a single spike stands out.

Sitemap index files

A sitemap index can list up to 50,000 sitemaps, and each one must be on the same site, in the index’s folder or deeper. The XML sitemap validator follows every sitemap the index lists, checks that each one returns 200, and flags sitemaps outside the index’s folder or host. It also warns about an index that lists another index, because the protocol describes index files that list sitemaps, and Google’s documentation doesn’t cover nesting.

Image, video, and news sitemaps

  • Images: each <image:image> needs an <image:loc>, with up to 1,000 images per URL. Google removed image:caption, title, geo_location, and license from its image sitemap documentation.
  • Videos: each video needs thumbnail_loc, title, description, and content_loc or player_loc, which can’t be the page URL. Duration must be 1 to 28,800 seconds, and the description up to 2,048 characters, as Google’s video sitemap rules say.
  • News: each article needs a publication name and language, a publication date, and a title, and Google says to include only articles from the last two days, with up to 1,000 per news sitemap.
  • hreflang: each xhtml:link needs an hreflang code and a full href. To check return links and codes across the site, use the Hreflang Validator.

Extension tags are only recognized with Google’s exact namespace, so the XML sitemap validator flags typos such as an https:// version of the namespace URI.

Compare your sitemap with a crawl

A sitemap should list the pages you want in search results, so URLs that redirect, return 404, are noindex, or point to another canonical don’t belong. Add a crawl export, and the XML sitemap checker marks each one and lists indexable pages that no sitemap includes. The fixed sitemap can drop the bad URLs and swap canonicalized URLs for their canonical, unless the canonical itself fails.

Download a fixed sitemap

The Fixed sitemap tab removes invalid and duplicate URLs, escapes every value, and can remove priority and changefreq, bad or generated lastmod dates, and URLs your crawl flags. It keeps image, video, news, and hreflang tags without the deprecated ones. More than 50,000 URLs are split into several files with a sitemap index, and several files download as a .zip. To build a sitemap from a URL list or crawl instead, use the XML Sitemap Generator.

Submit the fixed sitemap to Google

Upload the fixed files to the same addresses as the old ones, check the sitemap again by URL to confirm it returns 200 with no errors, and submit it, or the sitemap index, in the Sitemaps report in Search Console. Add a Sitemap: line to robots.txt so other search engines find it too. Google says submitting a sitemap is a hint, not a guarantee that it will be downloaded or that every URL will be crawled, so fix the pages the crawl flagged as well. Run the XML sitemap validator again whenever your CMS, plugin, or site structure changes.

Privacy and how URL checks work

Files you upload or paste are checked in your browser and never uploaded. Browsers can’t download other sites’ files directly, so when you check by URL, our server downloads the public sitemap and robots.txt and passes them to your browser, where every check runs. Nothing is stored. Each visitor can fetch up to 300 files an hour, and sitemaps over 15 MB must be downloaded and dropped in as files. To check how robots.txt treats your URLs, use the robots.txt Tester.

XML Sitemap Validator FAQ

What does an XML sitemap validator check?

That the file is well-formed UTF-8 XML with the sitemaps.org namespace, within 50,000 URLs and 50 MB, with full URLs on the sitemap’s own site, valid lastmod dates, and valid image, video, and news tags.

Can I check a sitemap index?

Yes. Enter the index URL and the validator follows it to up to 100 sitemaps, checking that each one returns 200 and is in the index’s folder.

Does Google use priority and changefreq?

No. Google ignores them, and uses lastmod only when it’s consistently and verifiably accurate.

Why does my sitemap say text before the XML declaration?

Something prints whitespace before . Remove it and check again.

Can it find pages missing from my sitemap?

Yes, if you add a crawl export. It lists indexable pages that return 200 but aren’t in any sitemap.

Is my sitemap stored?

No. Uploaded files are checked in your browser. Sitemaps checked by URL are downloaded by our server, passed to your browser, and discarded.

Built and reviewed by Devansh Thakkar

WordPress developer and technical SEO specialist with 250+ client projects delivered since 2019. This tool and guide were last updated on .

More about Devansh Thakkar
  • XML Sitemap Generator

    Turn a list of URLs, a crawl export, or an existing sitemap into a clean, valid XML sitemap, split and indexed for large sites.

  • robots.txt Tester

    Test any URL against your robots.txt for Googlebot, Bingbot, AI crawlers, and more, with the exact line that decides each result.

  • Hreflang Validator

    Check hreflang across your whole site for missing return links, invalid codes, and conflicts, and get corrected tags for every page.

  • htaccess Redirect Generator

    Turn old and new URLs into 301 redirect rules for Apache, Nginx, IIS, Cloudflare, Netlify, Vercel, Next.js, or WordPress, with chains fixed and loops caught.

  • Search & AI Bot Log Analyzer

    Drop in server access logs to see what Googlebot, Bingbot, GPTBot, and 80+ other bots crawl, catch fake bots, and find crawl waste. Nothing is uploaded.

  • Search Console Regex Builder

    Build Search Console regex filters for questions, non-brand, long-tail, and page patterns, and test them on your own export.