Sitemaps module creating nested index when sitemap contains 50k+ records
At the moment Jetpack's sitemap module will create multiple levels of sitemap indexes when there are more than 50,000 records on a sitemap file
- sitemap.xml (index)
- sitemap-index-1.xml (index)
- sitemap-1.xml (sitemap file)
- sitemap-2.xml (sitemap file)
- image-sitemap-index-1.xml (index)
- image-sitemap-1.xml (sitemap file)
- image-sitemap-2.xml (sitemap file)
- sitemap-index-1.xml (index)
Google doesn't support nested index when when parsing the sitemap and would throw this error in the Google Search Console Nested indexing – This Sitemap Index is referenced by another Sitemap Index. This is problematic for any large sites.
A fix would be to remove the second level of index altogether so that the structure looks like this:
- sitemap.xml (index)
- sitemap-1.xml (sitemap file)
- sitemap-2.xml (sitemap file)
- image-sitemap-1.xml (sitemap file)
- image-sitemap-2.xml (sitemap file)
Example of nested sitemap (currently on Jetpack 6.0): https://techcrunch.com/sitemap.xml
Issue has been referenced here: https://wordpress.org/support/topic/this-sitemap-index-is-referenced-by-another-sitemap-index/
also requested in #243926-hc
also requested in 888777-zen
Can confirm this is happening for our site as well. A fix might be to reference the sitemap-index-1.xml and submit to google, but I'm concerned if we do this and the bug removes this nesting, we will, again, have broken sitemaps.
Another request in 1007392-zen
I've re-tested with different sites on Jetpack 6.0/6.1 and for both versions, sitemaps are nested.
Example of nested sitemap (currently on Jetpack 6.0): https://techcrunch.com/sitemap.xml
Also requested in 1156250-zen
Again in 4335041-hc
1746509-zen
One thing to note on this one is the main sitemap is not generating showing the links to the submaps, so for instance https://domain.com/sitemap.xml shows nothing but https://domain.com/sitemap-index-1.xml does
Another one here: 1745034-zen
Same user as reported by Jon directly above but for a different site. We've let them know to investigate other sitemap options.
1753979-zen
Sitemaps are not being generated. sitemap.xml shows blank. Could not access sitemap-1.xml or sitemap-index-1.xml as well.
Site has over 160k posts.
1789374-zen
i have the same issue with the site map Nested indexing This Sitemap Index is referenced by another Sitemap Index.
as well as for the video sitemap This is not a valid URL. Please correct it and resubmit. Line: 4 Line: 4 Line: 4
as well as for the video sitemap This is not a valid URL.
@mari444 Could you contact us via this contact form to give us more details about your site, so we can take a closer look at this problem with you?
Thank you!
Reported in 1815576-zen
@jeherve it's been 4 days since i first contacted you, 2 days since you told me to contact again with the details. I still didn't receive any update/reply. Thank you
@mari444 If you contacted us via the contact form I linked to earlier, we'll get back to you very soon!
@jeherve yes i did, twice and i didn't get any reply.
Seeing this in 2014789-zen but they apparently only have 6k post types but a lot of other CPTs that are likely putting them over 50k.
2507471-zen - just around 10k posts, Atomic site, blog_id = 169375016