jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Sitemaps module creating nested index when sitemap contains 50k+ records

Open lamdayap opened this issue 9 years ago • 24 comments

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)

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

lamdayap avatar Sep 21 '17 01:09 lamdayap

Issue has been referenced here: https://wordpress.org/support/topic/this-sitemap-index-is-referenced-by-another-sitemap-index/

lamdayap avatar Sep 21 '17 01:09 lamdayap

also requested in #243926-hc

ntpixels avatar Dec 11 '17 23:12 ntpixels

also requested in 888777-zen

macmanx2 avatar Jan 09 '18 06:01 macmanx2

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.

orenwolf avatar Jan 10 '18 04:01 orenwolf

Another request in 1007392-zen

KokkieH avatar Mar 21 '18 13:03 KokkieH

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

brbrr avatar May 02 '18 13:05 brbrr

Also requested in 1156250-zen

joeboydston avatar May 13 '18 15:05 joeboydston

Again in 4335041-hc

ghost avatar Jun 26 '18 17:06 ghost

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

bikedorkjon avatar Jan 25 '19 03:01 bikedorkjon

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.

a8ck3n avatar Jan 25 '19 04:01 a8ck3n

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.

dericleeyy avatar Feb 04 '19 08:02 dericleeyy

1789374-zen

interlineae avatar Feb 09 '19 14:02 interlineae

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

mari444 avatar Feb 19 '19 07:02 mari444

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!

jeherve avatar Feb 19 '19 09:02 jeherve

Reported in 1815576-zen

pmciano avatar Feb 19 '19 17:02 pmciano

@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 avatar Feb 21 '19 06:02 mari444

@mari444 If you contacted us via the contact form I linked to earlier, we'll get back to you very soon!

jeherve avatar Feb 21 '19 11:02 jeherve

@jeherve yes i did, twice and i didn't get any reply.

mari444 avatar Feb 21 '19 15:02 mari444

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.

bikedorkjon avatar May 08 '19 00:05 bikedorkjon

2507471-zen - just around 10k posts, Atomic site, blog_id = 169375016

htdat avatar Nov 21 '19 03:11 htdat