Netlify "Page not found" when refreshing or opening a link

Netlify shows "Page not found" on refresh or deep links? Add the /* /index.html 200 rewrite so your single-page app handles routing.

Last edited October 17, 2026

On this page

What it means in plain English

Same cause as on Vercel: your app is a single HTML page that handles routes in the browser, but Netlify looks for a real file at each path.

Deploy Without Errors Pack

Environment variables on Vercel, Netlify and Replit, SPA refresh rewrites, npm peer dependency errors and domain setup.

See what’s inside

Secure checkout by Stripe

One-time payment through Stripe. Priced in USD. Local taxes such as UK VAT may be added at checkout.

Likely causes

  • No _redirects file or netlify.toml redirect.
  • The _redirects file isn't in the published folder (e.g. it's not copied into dist).

How to fix it, step by step

  1. Create public/_redirects (Vite copies public/ into dist/) containing:
/*  /index.html  200
  1. Or in netlify.toml:
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200
  1. Make this the last rule if you have others. Real files still win, so assets keep loading.
  2. Commit and redeploy.

How to check it worked

  • Open a deep link directly and refresh; it should load.
  • In the deploy summary, Netlify should list 1+ redirect rules processed.

The same missing rewrite is what turns a Stripe Checkout success URL into "Page not found". See Stripe success page 404 on Netlify.

Sources

Tool to consider: Netlify.

Deploy Without Errors Pack

Environment variables on Vercel, Netlify and Replit, SPA refresh rewrites, npm peer dependency errors and domain setup.

See what’s inside

Secure checkout by Stripe

One-time payment through Stripe. Priced in USD. Local taxes such as UK VAT may be added at checkout.