I have multiple routes in my react project. But only the homepage loads perfectly, but other routes are not working. But everything works fine locally.
perry
April 10, 2020, 4:34pm
2
Hi there,
Did you see this guide yet? This is the best place to start for “Page Not Found” issues.
Last reviewed by Netlify Support - August, 2023
Netlify attempts to lookup a file based on several xor filters, and when all of these fail, we end up serving a 404 page. For example, a request made to /example/ would check /example/index.html, /example.html, /example/home.html and several other combinations (not necessarily in the same order) before hitting the 404. However, in case you were not expecting a 404 at a particular URL, you might be interested in finding out the reason and potentia…
Last reviewed by Netlify Support - August, 2023
If you’re building a Single Page Application (SPA), or an app that manages its own routes (url paths), you’ll want to add a _redirects file to your publish directory with the following line to take advantage of browser history pushstate:
/* /index.html 200
You can read more information in our docs, which can be found here .
If you are still seeing issues after following the troubleshooting steps in this guide, please let us know!