Guide
Works in the preview, breaks after deploy
Everything worked while you were building. Then you deployed to Netlify, Vercel or your own domain, and something died: login, data, a page, or the whole app.
The preview is a comfortable bubble. Production is the real world. These are the four differences that break apps, from most to least common.
1. Settings that didn't come with you
Your builder keeps your keys (database URL, API keys) in its own environment. Exporting or deploying the code does not copy them. The app starts without them and quietly fails.
Fix: list every key the app uses, add each one in your host's dashboard (Netlify: Site settings → Environment variables; Vercel: Project → Settings → Environment Variables), then redeploy. Keys used in the browser usually need the VITE_ prefix.
2. Your login doesn't know the new address
Sign-in services only send users back to addresses they trust. Your preview address was trusted; your new domain isn't. Users log in and bounce back to the login page, or land on an error.
Fix: in Supabase, go to Authentication → URL Configuration and add your live domain to Site URL and Redirect URLs. If you use Google sign-in, add the domain there too.
3. Refreshing a page gives "Page not found"
The home page works, but any other page 404s when you refresh or open a link directly. The host is looking for a file that doesn't exist, because your app handles pages itself.
Fix: add a rewrite so every path serves index.html. On Netlify, a file named _redirects containing /* /index.html 200. On Vercel, a rewrite in vercel.json.
4. Links still point at the preview
Buttons, emails or payment redirects still go to the preview address, which works for you but not for customers.
Fix: search your project for the preview domain and replace it with your live domain.
Not sure which one it is?
Paste your live link at vibe-fixer.com: an AI agent uses the deployed app like a first customer and tells you how many problems it hits. Free, no account.
Still stuck?
Paste your app’s link for a free test — no account. Your AI agent goes through it like a first customer, shows you what breaks, then fixes it while you watch.