#7 most commondeployLovableBolt.newCursorReplitv0Windsurf

404 / Page not found when refreshing or opening a link on the live site

404: NOT_FOUND Code: NOT_FOUND (Vercel) / Page not found: Looks like you've followed a broken link (Netlify). Only on routes like /dashboard after refresh.

Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.

Paste your error →

What it means

Your app handles its pages inside the browser, but when you refresh, the hosting service looks for a real file called /dashboard, can't find it, and shows 404. It needs one rule saying 'always send people to the app'.

How to fix it: paste this prompt into your AI builder

Fix prompt for Lovable, Bolt, Cursor, Replit, v0, Windsurf
My deployed single-page app returns 404 when I refresh or open a direct link like /dashboard. Add the correct SPA fallback for my host without touching app code: for Vercel, a vercel.json at the project root with {"rewrites":[{"source":"/(.*)","destination":"/index.html"}]} (exclude /api routes if any); for Netlify, a public/_redirects file containing "/* /index.html 200"; for Cloudflare Pages, don't ship a top-level 404.html so its SPA fallback applies. Do not add this to a Next.js project. Tell me which host config you added.

If the AI can't fix it: manual steps

  1. Make sure the config file is committed to Git and then redeploy.
  2. Netlify's _redirects must end up in the published folder (put it in public/).

Where this happens

Seen in these AI app builders and editors:

LovableBolt.newCursorReplitv0Windsurf

Sources

Related deploy errors

Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.

Fix my error →