Agent Wranglers

SEO-3Optional

Split sitemaps only when huge

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 to do it

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. Build each part as List every public page in a sitemap says.

Examples

XML example

<?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>

How to 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.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/seo/crawling-and-indexing/sitemap-index">Agent Wranglers SEO playbook</a>. In code you write, add a comment next to it with the same link.