# Sitemap validator

Validate sitemap XML: structure, absolute URLs, dates, changefreq, priority, duplicates and the 50,000 URL limit.

- Endpoint: `POST https://setget.net/v1/tools/sitemap-validate` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `sitemap-validate`
- Page: https://setget.net/tools/sitemap-validate

## Inputs

- `text` (required, string): The sitemap XML (a urlset or a sitemapindex).

## Example 1

```json
{"input":{"text":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url><loc>https://example.com/</loc><lastmod>2026-01-15</lastmod><priority>0.8</priority></url>\n  <url><loc>/about</loc><changefreq>sometimes</changefreq></url>\n</urlset>"}}
```

Result:

```json
{"valid":false,"type":"urlset","entries":2,"with_lastmod":1,"problem_count":2,"problems":[{"line":4,"message":"The address \"/about\" is not absolute. It must start with http:// or https://."},{"line":4,"message":"changefreq \"sometimes\" is not allowed. Use always, hourly, daily, weekly, monthly, yearly or never."}]}
```

## Example 2: A sitemap index

```json
{"input":{"text":"<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><sitemap><loc>https://example.com/sitemap-1.xml</loc></sitemap></sitemapindex>"}}
```

Result:

```json
{"valid":true,"type":"sitemapindex","entries":1,"with_lastmod":0,"problem_count":0,"problems":[]}
```

**Are the listed pages checked?** No. Only the XML you paste is examined. No address is requested.

**Why is a DOCTYPE rejected?** Sitemaps do not need one, and DOCTYPE and entity declarations are a known way to attack XML readers, so this tool refuses them.

**Which date formats are accepted for lastmod?** The W3C formats: 2026-01-15, 2026-01, 2026, or a full time such as 2026-01-15T09:30:00+00:00.

**How many problems are listed?** The first 100. problem_count gives the total.
