Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should redirection response code be 302 instead of 301 #8

Closed
datakurre opened this issue Oct 6, 2017 · 3 comments
Closed

Should redirection response code be 302 instead of 301 #8

datakurre opened this issue Oct 6, 2017 · 3 comments

Comments

@datakurre
Copy link
Member

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

ale-rt added a commit that referenced this issue Feb 14, 2020
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.

This was inspired by plone/plone.rest#76

Refs #8
ale-rt added a commit that referenced this issue Feb 14, 2020
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.

This was inspired by plone/plone.rest#76

Refs #8
@mauritsvanrees
Copy link
Sponsor Member

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
Copy link
Sponsor Member

tisto commented Oct 16, 2022

@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
Copy link
Member

ale-rt commented Oct 16, 2022

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

This has been already evaluated: #22 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants