[wp-trac] [WordPress Trac] #54010: Redirect from /sitemap.xml to /wp-sitemap.xml needs to be 301 and not 302

WordPress Trac noreply at wordpress.org
Fri Aug 27 00:35:49 UTC 2021


#54010: Redirect from /sitemap.xml to /wp-sitemap.xml needs to be 301 and not 302
--------------------------+------------------------------
 Reporter:  RedBMedia     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Sitemaps      |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by RedBMedia):

 Hey Jono! I agree that transferring equity doesn't matter. I am only
 concerned with submitting to search console. I had a error with a new
 client recently when they put the wrong URL in, and when I checked I
 noticed the 302 redirect. I'll double check it again and make sure its not
 a reoccurring issue. But as I assumed originally it would make sense that
 GSC would ignore the 302, even if they shouldn't. I know some of their
 crawl and render tools still handle the 302 the same way Googlebot does.
 But I'll double check again and see. You are likely right though.



 Replying to [comment:4 jonoaldersonwp]:
 > Hey, Joe!
 >
 > I'm on the fence. 302s are definitely problematic in that search engines
 won't typically/officially pass equity through them. However, there are a
 few moving parts here:
 >
 > - If a user changes their XML sitemap plugin, 301s are more likely to be
 cached (by browsers and intermediary systems like CDNs); that might cause
 problems when there's a long expiration window
 > - We don't need to worry about equity in the case of sitemaps
 > - If users are entering the wrong URL for their sitemap, this feels at
 least in part like a user/education problem
 > - Submitting invalid sitemaps to Google Search Console / similar doesn't
 typically cause any harm
 >
 > I think that the caching issue is significant enough to warrant us
 sticking with a 302, even though that's suboptimal.
 >
 > Joe, do you have any examples of GSC not recognizing a 302'd sitemap? In
 my (admittedly brief, and singular) testing, it seems to follow it to the
 destination successfully. Might be other factors at play, though!
 >
 > It might be a better route to get the GSC folks to fix this at their
 end; there are undoubtedly myriad sites - beyond WP - which serve sitemaps
 via a 302 redirect!
 >
 >

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54010#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list