Return HTTP 301 to client when redirect occurs for old DSpace 6.x URLs #2265
Labels
bug
component: SEO
Search Engine Optimization
help wanted
Needs a volunteer to claim to move forward
high priority
Milestone
Describe the bug
Follow-up to #1147
The Google Scholar team noted that when older-style
/handle
URLs (e.g./handle/[prefix]/[suffix]
) are redirected to new URLs (e.g./items/[uuid]
), the redirect does not return anHTTP 301 Moved Permanently
to the client. Instead, a 200 OK is returned (and the redirect happens via Javascript).To Reproduce
Steps to reproduce the behavior:
/handle/[prefix]/[suffix]
for a Community, Collection or Item./handle/[prefix]/[suffix]
URL in your browser's address bar. Notice in DevTools that a 200 OK is returned even though the redirect occurs (internally via JavaScript)Expected behavior
Ideally the redirect should occur via 301 (or 302) response code. This allows crawlers to be notified properly of the redirect and avoids the page being indexed twice under two different URLs.
Related work
Related to initial redirect work in #1147
The text was updated successfully, but these errors were encountered: