Agent Wranglers

SEO Optional

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.

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.

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.