NotFoundPage incorrectly gives 200 status error instead of 404
See original GitHub issueBecause Redwood is a single-page app, the built-in 404-page web/src/pages/NotFoundPage/NotFoundPage.js is handled by WebPack as a “normal” page, i.e. it’s optimized and becomes a part of the dist/static/js/…chunk.js files during build. This can/could be problematic because it results in a 200 http status code for the 404 page and it also requires JS.
This seems like a good opportunity to take a step forward with Redwood pre-rendering! The goal would be to build NotFoundPage as a separate, static asset. Likely there are other solutions that would work (possible that WebPack already has a config option). But if there’s a way to learn and step toward Redwood having pre-render capability, I suggest that be the preferred option.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:22 (22 by maintainers)
Top Results From Across the Web
php - 404 error page showing HTTP Status 200 instead of 404
You need to place the header function for 404 on the "404_error" page instead of the page that redirects. This because the browser...
Read more >How to Fix the 404 Page Not Found Error In WordPress
Creating Your Own Error 404 Not Found Page on WordPress ... the visitor's web browser will receive a 200 HTTP status code from...
Read more >404 Pages Should Not Return 200 Status Codes
404 Pages Should Not Return 200 Status Codes ... "Page Not Found" web pages return a 200 header status code, instead of a...
Read more >The Ultimate Guide To 404, 410, and Soft 404 Errors
The default HTTP status response code for non-error pages is a 200, which means this page is “Okay”. If the default response code...
Read more >get custom not found page to return 404 status code
... to get Umbraco to return a "proper" 404 status code instead of 200 ... the custom 404 page throws a 404 status,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Same for GraphQL, I think the web don’t care about HTTP code anymore 😅
Per Core Team Discussion: