Page Not Found issue on a SPA React v16 site that works if I don't reload the page

Hey Guys,

I’m having trouble to find the root cause of my site not working properly on Netlify as it works just fine in local.

The site affected is https://app.smsparatodos.com and without using a custom domain the app is https://react-app-smsparatodos.netlify.app

You can see the problem by visiting the site and once you are redirected to “/auth/login” you can click on any other links you see in that page, but once you reload the page boom, page not found, which seems to be a page not found running on Netlify(I don’t even see my own 404 error page).

I’m using the most recent version of React Router and I downloaded the zip generated by Netlify on the most recent build but it works great on local, so I think this is something related to Netlify.

Please let me know any ideas to debug this problem, thank you in advance

I’m following now this guide ReactJS SPA Reload Page Fails - #2 by perry and Rewrites and proxies | Netlify Docs hopefully that will fix the problem, I’ll share my status in a minute

1 Like

Yaay it worked!!!, as I’m using React.js 16.xx I just basically created this file:

public/_redirects

with the following content:

/* /index.html 200

And now, I can access all my routes directly, thank you guys

2 Likes

Thanks so much for following up to let us know you found a solution! Sounds like an appropriate one to me - same thing I would have suggested :slight_smile: