Sitemap Index Files for Large Sites
You'll learn how to split large sitemaps across multiple files and organize them using sitemap index files.
Why Split Sitemaps?
Search engines impose a 50,000 URL limit and 50MB file size limit on individual sitemap files. Large sites with hundreds of thousands of pages need to break their sitemaps into manageable chunks. Think of it like a book series: instead of one massive 10,000-page book, you have multiple volumes with a table of contents pointing to each one.
What is a Sitemap Index?
A sitemap index file is a master sitemap that references other sitemaps. It follows the same XML format but uses different tags. Instead of listing URLs, it lists the locations of other sitemap files.
Structure of a Sitemap Index
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
<lastmod>2024-01-15</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-blog.xml</loc>
<lastmod>2024-01-14</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
<lastmod>2024-01-10</lastmod>
</sitemap>
</sitemapindex>
Common Organization Patterns
- By content type: separate sitemaps for products, blog posts, category pages
- By date: monthly or yearly archives (sitemap-2024-01.xml)
- By language: different sitemaps for each locale
- By arbitrary splits: sitemap-1.xml, sitemap-2.xml when hitting size limits
The <lastmod> element helps search engines prioritize crawling recently updated sitemaps.
Key Takeaway: When your site exceeds 50,000 URLs or 50MB, split your sitemap into multiple files organized by content type, date, or size, and use a sitemap index file to tell search engines where each one lives.