A single page app has one real file, index.html. Routes like /dashboard exist only inside the JavaScript router. Click a link and it works. Refresh, or open that URL directly, and the server looks for a file called dashboard, finds nothing and returns 404.
The fix is to tell Vercel to serve index.html for every path and let the router take over.
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}git add vercel.json
git commit -m "Add SPA rewrite"
git pushcurl -I https://your-app.vercel.app/dashboardClient-side routes are not real files. On refresh the server looks for a file at that path and finds none. A rewrite to /index.html hands the request to your router.
In the project root, next to package.json.
The free health check asks ten questions about your app and shows the three fixes to do first. It runs in your browser.
If you would rather have someone read the code, the fixed-price audit is $497 one-time. It covers security and scaling, with a written report ranked by severity.