A single XML sitemap can hold up to 50,000 URLs and must not exceed 50MB uncompressed. If your site is larger, split the URLs across several sitemaps and list them in a sitemap index file. Search engines then read the index and fetch each child sitemap.
The limits
- 50,000 URLs per sitemap file.
- 50MB per file when uncompressed.
- Up to 50,000 sitemaps listed in one index file.
These limits come from the sitemap protocol that Google and other search engines follow.
What a sitemap index looks like
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://www.example.com/sitemap-posts.xml</loc></sitemap>
<sitemap><loc>https://www.example.com/sitemap-pages.xml</loc></sitemap>
</sitemapindex>Not sure if this is hurting your site?
Get the fixes that matter most, in priority order.
Smart ways to split
Split by content type, such as pages, posts and products, rather than at random. This makes it easier to see in Search Console which section has indexing problems. Very large sites often split by date or category as well.
Do small sites need an index?
No. A site with a few hundred pages is fine with a single file. Add an index only when you approach the limits or want separate reporting by section.
Create your files
Build a valid file from a URL list with my free XML sitemap generator, then check it with the sitemap validator. For the basics, read what an XML sitemap is and how to submit one.
Tell search engines where it is
Submit the index in Search Console and reference it in robots.txt, as described in how to add a sitemap to robots.txt.
Frequently asked questions
Can I compress sitemaps?
Yes, gzip is supported, but the 50MB limit applies to the uncompressed size.
Can an index list another index?
No. An index should list sitemaps, not other indexes.
Next steps
If your sitemap structure is unclear, contact me here for a technical review.
More in this series (XML sitemap questions): start with Free XML Sitemap Generator, then explore:
- Which URLs Should Be in Your XML Sitemap (and Which Should Not)
- Sitemap Lastmod, Priority and Changefreq: Which Tags Matter?
- Image, Video and News Sitemaps: When Do You Need Them?
- Sitemap Could Not Be Fetched in Search Console: Causes and Fixes
Request received
Thank you! Saad will contact you within the next 24 hours.
Keep an eye on your phone and inbox.
