Open lorenzo-cavazzi opened 3 years ago
Info: that is a bit harder than I thought since it requires server rendering (we can't send a 404 if we render on the client) https://reactrouter.com/web/guides/server-rendering
Should go into the (still missing) ShapeUp project "Server Side Rendering"
From @Panaetius
I just noticed in a test that going to e.g. https://renkulab.io/doesnt_exist.png shows a 404 page, but doesn't return a 404 error status code. I think this is a bad practice, and it's also discouraged by search engines, e.g. google https://developers.google.com/search/blog/2008/08/farewell-to-soft-404s / https://developers.google.com/search/docs/advanced/crawling/soft-404-errors
It should be easy to specify a response code with react-router.