-
Notifications
You must be signed in to change notification settings - Fork 504
Description
Describe the bug
In DSpace, pages that should return proper HTTP error codes (e.g., 500, 404, or 403) are instead returning a 200 OK status. This misbehavior affects search engine indexing and SEO, as search engines may incorrectly interpret error pages as valid content.
I’ve tested this issue on the DSpace demo site using Firefox and Chrome, and the following URLs all return a 200 OK status instead of the appropriate error code:
This issue has been observed in both DSpace 7.x and DSpace 8.x.
To Reproduce
Steps to reproduce the behavior:
- Open a browser (Chrome, Firefox)
- Navigate to one of the following URLs:
- Inspect the HTTP response headers (e.g., using browser developer tools or
curl -I) - Notice that the status code is
200 OK, even though the page clearly shows an error message
Expected behavior
The HTTP response should return the correct error status code:
404 Not Foundfor missing pages403 Forbiddenfor unauthorized access500 Internal Server Errorfor internal failures
This ensures correct behavior for clients and search engines, and improves SEO by preventing incorrect indexing of error pages.
Related work
N/A – please let me know if there's an existing issue or PR related to this.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status