DEV Community

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

Posted on • Edited on

1 1

"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)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay