Skip to content

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