Adding a sitemap to the robotsTxtOptions.additionalSitemaps list adds it to the sitemap index
andrewliden opened this issue · 5 comments
Describe the bug
Adding a sitemap to the robotsTxtOptions.additionalSitemaps list adds it to the sitemap index. The exclude list does not solve this problem. I even tried excluding all by adding '*' to the exclude list. The sitemap in robotsTxtOptions.additionalSitemaps was still added to the index (and it was the only entry).
This is problematic, because it creates a nested sitemap index error. Nested sitemap indexes are generally unsupported by search engines.
To Reproduce
- Create a serverside sitemap index using getServerSideSitemapIndex.
- Attempt to exclude it using the exclude list.
- Examine the generated sitemap.xml index.
- Notice that the sitemap.xml index contains an index, which is a nested sitemap index, and thus a standards violation.
Expected behavior
Sitemap indexes should be included in robots.txt, but not in the sitemap.xml sitemap index. Excluding a sitemap index should remove it.
I have the same issue too, did you find a workaround?
I'm having the same problem, and I'm dealing with it by disabling the robotsOption.
Any workarounds?
Closing this issue due to inactivity.