I get a 404 error when opening links in browser

Hi,

When deployed application to Netlify, when I open any url other than home url by pasting it in the browser but everything works as excepted using localhost. I used react-router to switch between all my pages. any ideas what could be causing this?

,

Create a _redirects file in the public folder with the following content: /* /index.html 200.

You’re correct, this is due to React Router. If you search these forums, you’d get many people facing the same issue.