Your Lovable app works until you refresh, then Vercel says 404. The one-file fix

The home page loads, the buttons work, and then a refresh or a shared link lands on 404 NOT_FOUND. Your app isn't broken. The host is looking for a…

Aliteq
Syntax · Build Editor

The short answer

Your app is a single-page app. It has one real page, index.html, and JavaScript draws every other screen. Clicking around never asks the server for /about. A refresh or a pasted link does, and the…

Vercel: a vercel.json file in your project root that rewrites every path to /index.html

Netlify: a _redirects file with the line /* /index.html 200, placed in Vite's public folder

Cloudflare: Pages does this by default unless your build has a 404.html. Workers needs not_found_handling set to single-page-application

Newer Lovable projects (TanStack Start): this fix doesn't apply. They need a host that runs a server

Aliteq

Read the full story

Your Lovable app works until you refresh, then Vercel says 404. The one-file fix

Read the full story on Aliteq