"Page not found" on Netlify - React website deployment error solved
Pranesh Chowdhury

Pranesh Chowdhury @praneshchow

About: Excited to learn new things and technologies 🍁 Software Engineer | Technical Content Writer | Researcher

Joined:
Dec 20, 2020

"Page not found" on Netlify - React website deployment error solved

Publish Date: Apr 7 '24
2 0

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.

Comments 0 total

    Add comment