Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In my sitemap.xml file, a number of pages that are only visible to admins are being listed.
Google is indexing these links and showing these as crawl errors in the Search Console.
Not sure what other information I need to provide.
Comments
Comment #2
pmaguniaI should add that these are webform submissions that are being listed as 403.
Comment #3
pmaguniaThe solution I found was to rebuild and regenerate the sitemap from drush.
I have disabled sitemap rebuilding via cron via the Module interface. This way if I run cron as an authenticated user, there will be no 403s in the sitemap.xml file.
Comment #4
zakiya CreditAttribution: zakiya at Chapter Three commentedI'm experiencing the same issue. Drupal 8.5.1; xmlsitemap 8.x-1.0-alpha2
Nodes are being restricted using the Permissions By Term (permissions_by_term 8.x-1.44) module. I followed the suggestion above of running
drush cron
but the node is still in the sitemap. I also tried runningdrush xmlsitemap-regenerate
with the same result.Comment #5
zakiya CreditAttribution: zakiya at Chapter Three commentedFixed by
- First rebuilding the node grants using /admin/reports/status/rebuild
- rebuilding the sitemap
- drush xmlsitemap-rebuild
- drush xmlsitemap-regenerate
Comment #6
Dave ReidSounds like the node grants being out of date were the issue.