plone / plone.app.redirector

Redirects to moved content after accessing old URLs
https://pypi.python.org/pypi/plone.app.redirector
4 stars 4 forks source link

Should redirection response code be 302 instead of 301 #8

Closed datakurre closed 4 years ago

datakurre commented 7 years ago

301 really means permanent redirect, but nothing in Plone prevents creating new content to replace previously redirected paths

mauritsvanrees commented 4 years ago

Fixed with PR #22 a while ago. From its changelog:

"The http status of the response is changed from 301 (Moved Permanently) to 302 (Found) for GET requests and to 307 (Temporary Redirect) for other request methods because nothing prevents the URL to be reused in the future. [ale-rt]"

tisto commented 2 years ago

@datakurre @mauritsvanrees if we use a temporary redirect, Google will never index the new location as far as I understand (because it is only temporarily and not permanently). This means Google will keep the old URL forever. From an SEO point of view, this is not what we want in 99% of the cases.

A temp redirect is only a weak signal to index the content under the new location while a permanent redirect is a strong signal according to Google:

https://developers.google.com/search/docs/crawling-indexing/301-redirects

Maybe I am missing the point here. Though, as far as I understand things, we want to keep the current behavior.

ale-rt commented 2 years ago

I am sorry for the SEO guy but the issue depicted by @datakurre wins.

This has been already evaluated: https://github.com/plone/plone.app.redirector/pull/22#issuecomment-572281907