[go: nahoru, domu]

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

Non-existent pages return 200, but should return 404 http status #56853

Closed
fredsa opened this issue Jul 4, 2024 · 1 comment
Closed

Non-existent pages return 200, but should return 404 http status #56853

fredsa opened this issue Jul 4, 2024 · 1 comment
Assignees
Labels
area: adev Angular.dev documentation P2 The issue is important to a large percentage of users, with a workaround
Milestone

Comments

@fredsa
Copy link
Contributor
fredsa commented Jul 4, 2024

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 http 200 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:

  • Non-existent page returns http 404 status code

ACTUAL:

  • Non-existent page returns http 200 status code

Enter 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

@pkozlowski-opensource pkozlowski-opensource added the area: adev Angular.dev documentation label Jul 5, 2024
@ngbot ngbot bot added this to the needsTriage milestone Jul 5, 2024
@twerske twerske self-assigned this Jul 8, 2024
@twerske twerske added the P2 The issue is important to a large percentage of users, with a workaround label Jul 8, 2024
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jul 8, 2024
@twerske
Copy link
Contributor
twerske commented Jul 8, 2024

Closing as a duplicate of #53314.

For additional context, this is an open Angular feature request to be able to return alternative HTTP Status Codes that is not possible today.

@twerske twerske closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: adev Angular.dev documentation P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

No branches or pull requests

3 participants