Multi-Sitemap Support
Organize your sitemaps by content type with named sitemaps and automatic sitemap index
Why Multiple Sitemaps?
As your site grows, organizing URLs into separate sitemaps provides several benefits:
- Better GSC insights - Track indexing status by content type (products vs blog)
- Targeted optimization - Update product sitemaps hourly, blog sitemaps daily
- Cleaner organization - Separate image-heavy pages from text content
- Easier debugging - Find and fix indexing issues faster
SitemapHost automatically generates a sitemap index that references all your named sitemaps, compliant with Google's sitemap protocol.
How It Works
- Named Sitemaps -- Create separate sitemaps for different content types using the
sitemapNameparameter. - Auto Sitemap Index -- SitemapHost automatically creates and maintains a sitemap index containing all your sitemaps.
Common Sitemap Names
Some commonly used sitemap names:
pages-- General website pagesimages-- Pages with image metadataproducts-- E-commerce product pagesblog-- Blog postscategories-- Category/collection pageslocations-- Location-based pagesnews-- News articles
API Usage
Use the sitemapName parameter to create or update a named sitemap:
{
"domain": "sitemap.yoursite.com",
"sitemapName": "pages",
"urls": [
{ "loc": "https://yoursite.com/" },
{ "loc": "https://yoursite.com/about" },
{ "loc": "https://yoursite.com/contact" }
]
}{
"domain": "sitemap.yoursite.com",
"sitemapName": "images",
"urls": [
{
"loc": "https://yoursite.com/gallery",
"images": [
{ "loc": "https://cdn.yoursite.com/img1.jpg", "title": "Product Photo 1" },
{ "loc": "https://cdn.yoursite.com/img2.jpg", "title": "Product Photo 2" }
]
}
]
}Auto-Detection
If you don't provide a sitemapName, SitemapHost automatically detects the best name based on your content:
| Content Type | Auto-Detected Name | Detection Logic |
|---|---|---|
| Image-heavy content | images | >50% of URLs have images array |
| E-commerce | products | URLs contain /product/ or /products/ |
| Blog content | blog | URLs contain /blog/ or /post/ |
| Category pages | categories | URLs contain /category/ or /collection/ |
| General content | pages | Default fallback |
Pro tip: For best organization, we recommend explicitly setting
sitemapNamerather than relying on auto-detection.
Generated File Structure
Your domain will have a clean, organized sitemap structure:
https://sitemap.yoursite.com/
sitemap-index.xml # Master index (auto-generated)
sitemap-pages.xml # General pages
sitemap-images.xml # Image-focused pages
sitemap-products.xml # Product pages
sitemap-blog.xml # Blog postsSitemap Index Output
The auto-generated sitemap index references all your named sitemaps:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://sitemap.yoursite.com/sitemap-pages.xml</loc>
<lastmod>2024-01-15T10:30:00Z</lastmod>
</sitemap>
<sitemap>
<loc>https://sitemap.yoursite.com/sitemap-images.xml</loc>
<lastmod>2024-01-15T09:15:00Z</lastmod>
</sitemap>
<sitemap>
<loc>https://sitemap.yoursite.com/sitemap-products.xml</loc>
<lastmod>2024-01-15T11:00:00Z</lastmod>
</sitemap>
</sitemapindex>Updating Named Sitemaps
When you upload to a named sitemap, only that sitemap is replaced -- other named sitemaps remain unchanged. This allows you to update different content types independently.
# Update only the products sitemap (pages and images remain unchanged)
curl -X POST https://dash.sitemaphost.app/api/sitemap/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "sitemap.yoursite.com",
"sitemapName": "products",
"urls": [...your product URLs...]
}'Best Practices
- Consistent naming - Use the same sitemap names across updates
- Separate by update frequency - Products that change hourly vs static pages
- Keep image sitemaps separate - Easier to track image indexing in GSC
- Use descriptive names - "products-electronics" instead of "sitemap2"
- Submit the index to GSC - Point Search Console to sitemap-index.xml
Next Steps
- Image Sitemaps - Learn about image metadata support
- Upload API Reference - Full API documentation for sitemap generation