[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
Thu Aug 26 07:15:06 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 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:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list