Issue (Current Behaviour
There is no existing 404 page.
When a page or URL doesn't exist, the site automatically redirects back to the homepage.
Expected Behaviour
When a user lands on a URL or page that doesn't exist, a custom 404 page should be shown to the user. The server should also emit a 404 Response Code on the server when this happens.
Solution
Within React Router, you can set a page to redirect to a 404 page if it doesn't match anything.
Issue (Current Behaviour There is no existing 404 page.
When a page or URL doesn't exist, the site automatically redirects back to the homepage.
Expected Behaviour When a user lands on a URL or page that doesn't exist, a custom 404 page should be shown to the user. The server should also emit a 404 Response Code on the server when this happens.
Solution Within React Router, you can set a page to redirect to a 404 page if it doesn't match anything.
A guide on this can be found here: https://tylermcginnis.com/react-router-handling-404-pages/
Make sure that this 404 page has a
section. That can be completed with React Helmet.<meta name="robots" content="noindex">
in the