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

Post redirect to topic with 302 #8549

Closed
andreadragotta opened this issue Aug 5, 2020 · 2 comments
Closed

Post redirect to topic with 302 #8549

andreadragotta opened this issue Aug 5, 2020 · 2 comments

Comments

@andreadragotta
Copy link

Hi,

The post indexed on google use a 302 redirect but for the SEO i think is better a 301.

What do you think about that?

@andreadragotta andreadragotta changed the title Post redirect to topics with 302 Post redirect to topic with 302 Aug 5, 2020
@julianlam
Copy link
Member

👍 You are correct, 302 (or 307) does not transfer SEO juice™️

Need to use 301 or 308. Reason why we implemented this using a 302 is in case we mucked up the logic, it would really mess up your cache, but I think we're at the point where we can send a 308 instead 😄

@julianlam
Copy link
Member

Mm, upon further research, we cannot do this. The posts permalink redirects you to the topic, but we cannot guarantee with 100% certainty that the post will remain in that topic forever. Forking a topic will move posts to a new topic id, and so a 301 cached in the user's browser will forever send someone to the wrong topic. It is exceedingly difficult to remove a cached 301 from a browser, so it is best not to assume.

However, I will send a 301 for things such as referring to a topic with the incorrect/missing slug, etc...

@julianlam julianlam self-assigned this Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants