Free tool

XML Sitemap Validator

A free sitemap checker and verifier: test a sitemap.xml or sitemap index against the sitemaps.org protocol and Google’s limits. Every problem comes with its line number and what to change.

Validate a sitemap

Last updated

Check a sitemap

Fetch a live sitemap or paste one. You get every problem with its line number, and what to change.

For example https://example.com/sitemap.xml. A sitemap index works too. Up to 10 MB.

Result

What does the sitemap validator check?

The rules come from the sitemaps.org protocol and Google’s guide to building a sitemap. Errors stop a search engine reading the file or an entry; warnings are worth fixing; notes are information.

CheckWhat it looks for
Well-formed XMLEvery element closes in order; one mistake makes the whole file unreadable.
UTF-8 and escapingThe file must be UTF-8, and & in a URL must be written &.
Root element and namespace<urlset> or <sitemapindex> with the sitemaps.org namespace.
Absolute URLsEvery <loc> is a full http or https address, shorter than 2,048 characters.
Same host and folderWhen fetched by URL: entries are on the sitemap’s own host, and under its folder.
Size and countAt most 50,000 entries and 50 MB uncompressed per file.
Dateslastmod in W3C format, not in the future, and not the same date on every entry.
DuplicatesThe same URL listed more than once.
priority and changefreqValid values if present, with a note that Google and Bing ignore both.
How it is servedContent type, redirects, and whether robots.txt points to the sitemap.

What are the most common sitemap errors?

ProblemFix
An unescaped & in a URLWrite it as &amp;. One raw ampersand makes the whole file invalid XML.
The server returns an HTML pageThe address is wrong, or a plugin or theme is answering instead. Open it in a browser and check it shows XML.
Relative URLsWrite each <loc> in full, with https:// and the domain.
URLs on another hostList only your own host, such as www.example.com or example.com, whichever the site uses.
Every lastmod is todayThe sitemap is stamped with its build time. Use each page’s real last change, or leave lastmod out.
Over 50,000 URLsSplit the sitemap into several files and list them in a sitemap index.

Frequently asked questions

Does a valid sitemap get my pages indexed?

No. Google calls a submitted sitemap “merely a hint” (Google’s guide to building a sitemap); it helps discovery, and the pages still have to be worth indexing. The Search Console Sitemaps report shows what Google made of it.

Can it check a sitemap index?

Yes. It checks the index itself and counts the sitemaps it lists. Validate each listed sitemap on its own as well.

Does it check .xml.gz files?

Not yet. Paste the uncompressed sitemap, or validate the uncompressed version by URL if your site serves one.

Is anything stored?

No. The sitemap is checked and the report is sent to your browser; nothing is kept.