Next.js · Middle · Question 60 of 75
How do you split a sitemap of 200,000 product URLs?
- ✓Correct answer: Use
generateSitemapsto return several sitemap ids, and thesitemapfunction builds one file per id - 2One sitemap can hold unlimited URLs
- 3Put every URL into
robots.txt
Explanation
Search engines limit a sitemap to 50,000 URLs. Each id produces a separate URL like /product/sitemap/0.xml; in Next.js 16 the id argument is a Promise.