URL: /rules/crawl/sitemap-valid

---
title: "Sitemap Valid"
description: "Validates sitemap structure and URL limits"
---

Validates sitemap structure and URL limits

| | |
|---|---|
| **Rule ID** | `crawl/sitemap-valid` |
| **Category** | [Crawlability](/rules/crawl) |
| **Scope** | Site-wide |
| **Severity** | error |
| **Weight** | 8/10 |

## Solution

Sitemaps must follow the sitemap protocol: use UTF-8 encoding, proper XML structure, and valid URLs. Each sitemap file can contain max 50,000 URLs and be max 50MB uncompressed. For larger sites, use a sitemap index file. All URLs should return 200 status codes. Use lastmod dates to indicate content freshness. Compress with gzip for faster loading.

## Enable / Disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["crawl/sitemap-valid"]
```

### Disable all Crawlability rules

```toml squirrel.toml
[rules]
disable = ["crawl/*"]
```

### Enable only this rule

```toml squirrel.toml
[rules]
enable = ["crawl/sitemap-valid"]
disable = ["*"]
```
