# How do you design XML sitemaps for millions of URLs?

> Use sitemap indexes and split URL sets into manageable sitemap files according to the sitemap protocol limits.

Common segmentation:

`sitemap-index.xml
├── products-001.xml
├── products-002.xml
├── categories.xml
├── articles-001.xml
└── locations.xml
`
Segmenting by content type also improves diagnostics.

Monitor each sitemap separately in Search Console.

## Sources

- [Google Search Central — Build Sitemap](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap)
- [Sitemaps.org — Protocol](https://www.sitemaps.org/protocol.html)

## Related questions

- [How do sitemap errors help diagnose technical SEO problems?](https://www.theseocentral.com/technical-seo-faq/how-do-sitemap-errors-help-diagnose-technical-seo-problems.md)
- [How do you structure sitemap indexes for large websites?](https://www.theseocentral.com/technical-seo-faq/how-do-you-structure-sitemap-indexes-for-large-websites.md)
- [How do you troubleshoot sitemap URLs that Google isn't indexing?](https://www.theseocentral.com/technical-seo-faq/how-do-you-troubleshoot-sitemap-urls-that-google-isn-t-indexing.md)
- [How would you safely change robots.txt on a high-traffic production website?](https://www.theseocentral.com/technical-seo-faq/how-would-you-safely-change-robots-txt-on-a-high-traffic-production-website.md)
- [Should canonicalized URLs appear in XML sitemaps?](https://www.theseocentral.com/technical-seo-faq/should-canonicalized-urls-appear-in-xml-sitemaps.md)
- [Should noindexed URLs appear in XML sitemaps?](https://www.theseocentral.com/technical-seo-faq/should-noindexed-urls-appear-in-xml-sitemaps.md)
- [What are common mistakes in robots.txt?](https://www.theseocentral.com/technical-seo-faq/what-are-common-mistakes-in-robots-txt.md)
- [What happens if a URL is blocked by robots.txt but included in an XML sitemap?](https://www.theseocentral.com/technical-seo-faq/what-happens-if-a-url-is-blocked-by-robots-txt-but-included-in-an-xml-sitemap.md)
- [What should and shouldn't be included in an XML sitemap?](https://www.theseocentral.com/technical-seo-faq/what-should-and-shouldn-t-be-included-in-an-xml-sitemap.md)

---

Answered by Abhinav Krishna (https://www.theseocentral.com/author/abhinav-krishna)
Source: https://www.theseocentral.com/technical-seo-faq/how-do-you-design-xml-sitemaps-for-millions-of-urls
