404 when you refresh a page? Add an SPA rewrite
Your app works when you click around, but paste yoursite.com/dashboard into a new tab, or hit refresh, and you get a 404. This is common with single-page apps exported from Lovable, Bolt or v0 and hosted on static hosts like Netlify, Vercel or Cloudflare Pages.
The browser asks the server for /dashboard, but only index.html exists, so the host has nothing to send.
- Netlify: add a
_redirectsfile with/* /index.html 200. - Vercel: add a rewrite in
vercel.jsonsending all paths to/index.html. - Test it: open a deep link in a private window, not just the homepage.
Shared links and emails depend on this working. Run the free 30-second check.