Preview and Production
The Preview works but the live site doesn't
- What you see
- Everything works on the Preview link, but the live address fails or behaves differently.
- Why it happens
- Preview and Production have separate settings. Usually an environment variable exists for one and not the other.
- How to fix it
- Ask your agent to compare the environment variable names in both (
vercel env ls), never the values. - Add the missing one in Vercel yourself, then redeploy.
- Ask your agent to compare the environment variable names in both (
Message for your agent
My Preview works but Production doesn't. Compare the environment variable names for Preview and Production with `vercel env ls`, read the runtime logs, and tell me what's different.
Tip
How to prevent it: When you add a variable, tick both Production and Preview.
Was this page helpful?