# XML Sitemap Validator

> Check an XML sitemap or sitemap index free: structure, escaping, URLs, host, size, lastmod dates and serving, with a line number and a fix for every problem.

Source: https://llmstextgenerator.com/xml-sitemap-validator/
Last updated: 22 October 2026

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.

## What does the sitemap validator check?

The rules come from [the sitemaps.org protocol](https://www.sitemaps.org/protocol.html) and [Google’s guide to building a sitemap](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap). Errors stop a search engine reading the file or an entry; warnings are worth fixing; notes are information.

| Check | What it looks for |
| --- | --- |
| Well-formed XML | Every element closes in order; one mistake makes the whole file unreadable. |
| UTF-8 and escaping | The file must be UTF-8, and `&` in a URL must be written `&amp;`. |
| Root element and namespace | `<urlset>` or `<sitemapindex>` with the sitemaps.org namespace. |
| Absolute URLs | Every `<loc>` is a full http or https address, shorter than 2,048 characters. |
| Same host and folder | When fetched by URL: entries are on the sitemap’s own host, and under its folder. |
| Size and count | At most 50,000 entries and 50 MB uncompressed per file. |
| Dates | `lastmod` in W3C format, not in the future, and not the same date on every entry. |
| Duplicates | The same URL listed more than once. |
| priority and changefreq | Valid values if present, with a note that Google and Bing ignore both. |
| How it is served | Content type, redirects, and whether robots.txt points to the sitemap. |

## What are the most common sitemap errors?

| Problem | Fix |
| --- | --- |
| An unescaped `&` in a URL | Write it as `&amp;`. One raw ampersand makes the whole file invalid XML. |
| The server returns an HTML page | The address is wrong, or a plugin or theme is answering instead. Open it in a browser and check it shows XML. |
| Relative URLs | Write each `<loc>` in full, with `https://` and the domain. |
| URLs on another host | List only your own host, such as `www.example.com` or `example.com`, whichever the site uses. |
| Every lastmod is today | The sitemap is stamped with its build time. Use each page’s real last change, or leave lastmod out. |
| Over 50,000 URLs | Split 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](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-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.
