# Sitemap validator

Check sitemap XML for syntax, namespace, URL, date and size problems, with a clear fix for each.

Canonical page: https://aismarty.com/tools/sitemap-validator

## Purpose

Find problems in sitemap XML before you publish it: syntax errors, a wrong root or namespace, missing or invalid URLs, bad dates, invalid changefreq or priority values, duplicates and mixed hosts.

## How to use this tool

1. Paste your sitemap XML or open an .xml file from your device.
2. Choose Validate sitemap. Everything runs in your browser.
3. Fix the errors first, then review the warnings.

## Example inputs

- 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-02-30</lastmod>
  </url>
  <url>
    <loc>/relative/page</loc>
    <changefreq>sometimes</changefreq>
  </url>
  <url>
    <loc>https://www.example.com/</loc>
    <priority>1.5</priority>
  </url>
  <url>
    <lastmod>2026-09-01</lastmod>
  </url>
</urlset>


## Limits and what to check

It runs entirely in your browser and nothing is uploaded. Each sitemap is limited to 2 MB and 50,000 entries, and larger input is refused rather than cut short. DTDs and entities are refused for safety. A clean result means no errors were found by these protocol checks. It is not a full schema check, and it does not mean pages are indexed or ranked.

## Frequently asked questions

### What is checked?

Well-formed XML, the root element and namespace, required loc values, absolute http or https URLs under 2,048 characters, W3C dates, changefreq and priority values, duplicates and mixed hosts.

### Is my sitemap XML validated on a server?

No. Validation runs in your browser and nothing is sent to AI Smarty. Files and pasted XML are limited to 2 MB.

### Does a valid sitemap guarantee indexing?

No. Validation only finds protocol problems in the file. Search engines decide what to crawl, index and rank.

### Why is my DOCTYPE refused?

Document type and entity declarations can be used to attack XML parsers, so they are refused. Valid sitemaps do not need them.

## Related tools

- [Sitemap checker](https://aismarty.com/tools/sitemap-checker)
- [Sitemap index generator](https://aismarty.com/tools/sitemap-index-generator)
- [Robots.txt generator with sitemap](https://aismarty.com/tools/sitemap-robots-generator)
- [All tools](https://aismarty.com/tools)
