Step 10
If you're publishing a React app that uses a router that is based on HTML5 History API (like react-router, as we do), you'll need to configure redirects and rewrite rules for your URLs. To understand the issue, read Serving Apps with Client-Side Routing on create-react-app documentation.
Netlify makes configuring redirects and rewrite rules for your URLs really easy. You'll need to add a file inside the built folder of your app named, _redirects
. Inside the file, include the following rewrite rule.
/* /index.html 200
Then, run the deploy command again and follow the prompt:
netlify deploy