DEV Community

Cover image for Page not found on Netlify | React website deployment error solved
Pranesh Chowdhury
Pranesh Chowdhury

Posted on

Page not found on Netlify | React website deployment error solved

When deploying a React project through a build file or GitHub on Netlify. You may encounter an error when navigating and reloading different pages, as it displays "page not found."

Image description

Create a new file named _redirects in the public directory of your React project. Open the _redirects file in a text editor.

Image description

Then copy and paste this text into the _redirects file.

/* /index.html 200
Enter fullscreen mode Exit fullscreen mode

After creating the _redirects file, rebuild the project or push the repository again.

Top comments (0)