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.
Problem/Motivation
XML site map does not set to visible 301 redirects.
I want to move my site to a new domain. Google would like to get old/new URL's mapping, which I possibly can do via sitemap.xml which includes 301 redirects set using Drupal redirect https://www.drupal.org/project/redirect
Steps to reproduce
XML Sitemap entity settings select and include redirect -->ok
Afterwards redirects show under Sitemap settings as indexed, but are NOT set to visible. See the screenshot. Also are not showing in the sitemap https://www.primorskohotel.com/en/sitemap.xml
Comment | File | Size | Author |
---|---|---|---|
#5 | 3199259-exclude-redirects.patch | 426 bytes | Dave Reid |
| |||
sitemap.png | 69.86 KB | ivoo56 |
Comments
Comment #2
ivoo56 CreditAttribution: ivoo56 commentedComment #3
ivoo56 CreditAttribution: ivoo56 commentedComment #4
Dave ReidI don't believe that redirects are something that would be supported in the sitemap anyway, as they are not "visible" content as they don't really exist as content on their own to index.
Comment #5
Dave ReidSee http://www.thesempost.com/google-avoid-including-redirected-urls-sitemaps/ for more information on this.
Let's avoid this for others by specifically excluding the redirect module entity type from the list of selectable entity types.
Comment #6
Dave ReidComment #8
Dave ReidCommitted #5 to 8.x-1.x.