Non-existent pages return 200
, but should return 404
http status
#56853
Labels
area: adev
Angular.dev documentation
P2
The issue is important to a large percentage of users, with a workaround
Milestone
Describe the problem that you experienced
Non-existent pages, e.g. https://angular.dev/this-page-does-not-exist, are expected to return
404
http status. Instead, all bad URLs return http200
and dynamically inject the 'page not found' message to the user.The incorrect
200
status code informs web crawlers that the requested page is valid. The lack of actual useful content on that page might negatively affect ranking as those pages will be deemed to not have any relevant content on them.The incorrect
200
status code makes it difficult to detect broken links, incl. those internal to the site. As an example, this issue was discovered while diagnosing broken page,https://angular.dev/api/animations/%C9%B5AnimationGroupPlayer
(see #56850).EXPECTED:
404
status codeACTUAL:
200
status codeEnter the URL of the topic with the problem
https://angular.dev/api/animations/%C9%B5AnimationGroupPlayer
Describe what you were looking for in the documentation
No response
Describe the actions that led you to experience the problem
No response
Describe what you want to experience that would fix the problem
No response
Add a screenshot if that helps illustrate the problem
No response
If this problem caused an exception or error, please paste it here
No response
If the problem is browser-specific, please specify the device, OS, browser, and version
No response
Provide any additional information here in as much as detail as you can
No response
The text was updated successfully, but these errors were encountered: