Why does my app work in preview but break on my custom domain?
Because some settings still name the old domain: auth redirect URLs, CORS rules, OAuth providers, cookies or environment variables. I check each one against the live domain and fix them as a $750 Quick Fix.
On Vercel, changes to environment variables only apply to new deployments. A site deployed before the change keeps the old values until it is redeployed.
The usual causes
- Auth redirect URLs and the Site URL still set to the preview domain.
- OAuth apps (Google, GitHub) without the new domain in their allowed callback URLs.
- An API or edge function that only allows requests from the old origin.
- Environment variables set for preview deployments but not production.
- Cookies set for one domain and read on another, which causes login loops.
- www and non-www both live, with sessions on only one.
- Stripe webhooks and email links still pointing to the old URL.
How to narrow it down
Open the browser console and the network tab on the live domain and repeat the failing step. A CORS error names the blocked origin. A redirect back to the login page usually means a cookie or redirect URL problem. A 500 from an API usually means a missing environment variable.