Hosting and deploys
Refreshing a page gives a 404
Links work when you click them, but a refresh or a shared link lands on Not Found.
- What you get
- The host told to send every route to your app, tested on a link to an inner page.
- Paste it into
- Your AI tool, in your project
The prompt
On my live site, clicking around works, but refreshing a page or opening a link to an inner page gives a 404. Work out how this project does routing (in the browser or on the server) and how my host is configured. Explain in two sentences why the host can't find the page. Then add the rewrite or fallback rule this host needs, in the config file it reads, without breaking real files like images, the sitemap or API routes. Tell me three URLs to test after the next deploy, including one that should still return a real 404.
Use it
Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.
More in Hosting and deploys
Pick a host that fits this project
Vercel, Netlify, Cloudflare, Railway, a VPS: everyone recommends something different.
Requests time out in production
A slow request finishes locally but gets cut off on the host.
Keep test data out of your real database
Preview deploys and local testing talk to the same database and keys as the live site.
Have a way back before you ship
A bad deploy goes out and you don’t know how to undo it.