
GETA SEO Sitemaps - SitemapIndex Generation
This excellent module is used on a large number of Optimizely sites. I think I use it on almost every site I've delivered, but today I discovered a new feature that I didn't know existed.
Perhaps I'm late to the party, but I had a requirement for a client who is experiencing problems with their sitemap. The catalogue contained over 50,000 products, exceeding the limit for a single sitemap file. This meant that we needed to generate multiple sitemap files.
Whilst I could reference these files in the robots.txt file, I wanted to generate a single sitemapindex.xml file and reference it instead.
I fired up dotPeek to explore and determine the best way to implement this requirement myself, and I had various ideas until I stumbled upon the 'GetaSitemapIndexController'. Turns out the functionality already exists.
Configure your sitemaps
In the example below, I have created multiple sitemaps, and then for the commerce ones, I have also specified the node ID. This represents the category I want to generate within the sitemap.

Generated index file
The sitemap index file will automatically be returned in response to the request for sitemapindex.xml.

1<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
2 <sitemap>
3 <loc>https://www.xxxxxxxx.com/sitemap.xml</loc>
4 </sitemap>
5 <sitemap>
6 <loc>https://www.xxxxxxxx.com/commerce-cat1-sitemap.xml</loc>
7 </sitemap>
8 <sitemap>
9 <loc>https://www.xxxxxxxx.com/commerce-cat2-sitemap.xml</loc>
10 </sitemap>
11 <sitemap>
12 <loc>https://www.xxxxxxxx.com/commerce-cat3-sitemap.xml</loc>
13 </sitemap>
14</sitemapindex>
Conclusion
Whilst this may not be a common requirement for all sites, it is beneficial for larger e-commerce sites. Hopefully, someone finds this post useful.