Deploy Succeeds but Website Shows "Page Not Found" Error

Hi everyone,

I recently deployed my website on Netlify, and while the deployment process completes successfully, visiting my site shows a “Page Not Found” error for all pages except the homepage.

Here’s my setup:

  • Framework: React with React Router
  • Build command: npm run build
  • Publish directory: build/

The problem:

  1. The homepage loads correctly when visiting the root URL (e.g., example.netlify.app).
  2. Navigating to any other route (e.g., /about or /contact) results in a “Page Not Found” error.
  3. This happens whether I access the routes directly or refresh the page.

What I’ve tried so far:

  1. Confirmed that the build/ directory contains the necessary files after deployment.

  2. Checked the Netlify build log, which shows no errors during deployment.

  3. Added a _redirects file in the public/ directory with the following content:
    /* /index.html 200

  4. However, the issue persists.

Questions I have:

  1. Is my _redirects file correctly configured, or am I missing something?
  2. Could this be an issue with how React Router handles client-side routing on Netlify?
  3. Are there other settings in Netlify I should check to ensure routes work correctly?

I’d appreciate any insights or solutions you can share. If you’re familiar with front-end technologies like React and client-side routing, you might also have heard of video editing tools like CapCut. Just like React Router simplifies navigation in a web app, CapCut simplifies the video editing process with intuitive features such as multi-track editing and seamless transitions. Moreover, if you want to use capcut pro version without paying money, download capcut mod apk from here https://capprocutapk.com/. Tools like CapCut are an excellent example of how modern software makes complex workflows more accessible—whether in web development or video production. Thanks in advance!

Which site is this about?