---
title: "Split sitemaps only when huge · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/seo/sitemap-index
updated: 2026-10-20
licence: "All rights reserved"
---

# Split sitemaps only when huge

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Optional
- Chapter: [SEO](https://agentwranglers.se/playbook/website/seo)
- Rule: Split the sitemap only when one file would pass 50,000 URLs or 50 MB uncompressed. List the parts in a sitemap index. Below those limits, keep one file.
- How: Those are the limits of the sitemaps protocol. Above them, split by content type, such as pages and products, and list each part in a sitemap index. An index may list up to 50,000 sitemaps. Submit the index instead of each part.
- Check: A test counts the `<loc>` entries and bytes of every sitemap file. Each stays under 50,000 URLs and 50 MB uncompressed. Every sitemap listed in the index answers 200.

Example:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-pages.xml</loc>
    <lastmod>2026-03-02</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-products.xml</loc>
  </sitemap>
</sitemapindex>
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/seo/sitemap-index`.

- Previous: [List every public page in a sitemap](https://agentwranglers.se/playbook/website/seo/xml-sitemaps)
- Next: [List key images in the sitemap](https://agentwranglers.se/playbook/website/seo/image-sitemaps)
- [SEO](https://agentwranglers.se/playbook/website/seo)
