← Error Index

Build succeeds but the deployed site returns 404

Last verified Still happeningLovableBoltVercelNetlify
404 This page could not be found

A green build and a dead site. Almost always a wrong output directory or runtime target - which the build log gives the user no way to discover.

Symptom

Build passes. Deployment succeeds. The site 404s.

Why it happens

The host publishes whatever is in the configured output directory. If the framework writes to dist/ and the host is serving build/, the host serves an empty directory and every path 404s. Nothing errors, because from the host's point of view there is simply nothing there. For SPAs there is a second cause: without a rewrite sending all paths to index.html, only the index route resolves and deep links 404.

Fix

Check the framework's actual output directory against the host's publish-directory setting. For a client-side-routed SPA, add a catch-all rewrite to index.html. If the project is a Lovable app on Vercel, see the lovable-tanstack-nitro-vercel-404 record first - the cause there is different.