ReactJS SPA Reload Page Fails

Hi, I recently deployed a react website. It’s my first React and Netlify deployment

https://japanarchitected.netlify.com/

When I go to an endpoint in the SPA, and I reload in browser I get the failure message below.

For example: japanarchitected.netlify.com/language/kanjisearch

I’m assuming this is because my real URL ends at the .com/ Everything after that is react-router-dom routes internal to the SPA.

Page Not Found

Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.

Hi there,

Did you see this guide yet? This is the best place to start for “Page Not Found” issues.

This might also be relevant:

1 Like

Hi Perry,

The direct links internally work fine. It’s when I reload that they fail.

My react router is fine.

Hi @acrainier1, actually @perry already linked you to [Common Issue] Direct links to my single page app (SPA) don't work, which is the problem you’re experiencing. You need to provide a _redirects file or netlify.toml redirects rule in order to use your client-side router. You don’t currently have any redirects deployed.

1 Like