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

BUGFIX: use status code 301 in handleShortcutNode when redirecting #5389

Open
wants to merge 1 commit into
base: 8.3
Choose a base branch
from

Conversation

andrehoffmann30
Copy link
Contributor

With this bugfix the status code 301 is used when redirection from a shortcut document node instead of the default 303.

@andrehoffmann30 andrehoffmann30 force-pushed the bugfix/use-301-in-hableShorcut-Node branch from f628222 to fabc7fe Compare December 2, 2024 14:55
@andrehoffmann30 andrehoffmann30 marked this pull request as ready for review December 10, 2024 15:14
@andrehoffmann30
Copy link
Contributor Author

Hello dear Neos Community,
here is an explanation of why this change makes sense. The status code 301 is preferable for redirects from an SEO point of view, as it passes on the weighting of the original url to the new url for search engines (keyword linkjuice). The status code 303 should not be used for SEO-relevant redirects. However, many Neos users (such as one of our customers) use the shortcut node type primarily for redirects within a Neos website or for redirects to external but related websites and would like to retain SEO relevance for the redirect url. See also the following articles:

https://seoforum.com/thread/301-redirect-vs-303-redirect

https://webmasters.stackexchange.com/questions/123194/difference-between-301-and-303-status-codes#:~:text=303%20was%20intended%20to%20be%20used%20when%20a%20user%20sends%20a%20GET%20request%20to%20a%20POST%20url.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages

I hope the explanations help you. Please contact me if you have any further questions. Thank you very much.

@dlubitz
Copy link
Contributor

dlubitz commented Dec 11, 2024

Thank you @andrehoffmann30 for the PR. This was already discussed a lot (#4410) and we implemented a configurable solution for Neos 9: #4490

I wouldn't consider this as a bugfix. We could consider backporting this change to 8.4.

@kdambekalns
Copy link
Member

I couldn't are less for "link juice", and wil not approve this. Also, see https://web.archive.org/web/20200209130229/https://getluky.net/2010/12/14/301-redirects-cannot-be-undon/ (admittedly someone should verify if that is still valid…)

👍 for bringing #4490 into 8.4, though!

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

Successfully merging this pull request may close these issues.

3 participants