You changed an environment variable in Vercel. The live site still behaves as if nothing changed, or the value is undefined.
Why the change does not show up
- No redeploy. Vercel applies environment variables when a deployment is built. Existing deployments keep the old values. Redeploy after every change.
- Wrong environment. A variable can be set for Production, Preview and Development separately. You set it for Development and are looking at Production.
- Build-time inlining. Frontend frameworks copy
NEXT_PUBLIC_andVITE_values into the JavaScript at build. A runtime change needs a new build. - Cached build. Redeploy with the build cache cleared if the old value sticks.
- Branch scoping. A Preview variable can be limited to one Git branch.
- Typo or trailing whitespace in the name or value. Paste values carefully.
The unsafe fix
When the value is stuck or undefined, the shortcut is to hardcode the key in the source "just to test" and commit it, or to add NEXT_PUBLIC_ to the name so the browser can read it. Both put the secret where visitors and bots can read it. Public repos are scanned for keys within minutes, and shipped bundles are readable by anyone.
If you did either, rotate the key, then fix the config.
The safe pattern
- Server-only secrets: no public prefix, read only in server code.
- Public values (project URL, publishable key): fine with the prefix.
- After any change, redeploy, then check the live site, not just the dashboard.
- Mark sensitive variables as sensitive in the dashboard where available.
An outside view
ProofForge at proofforge.live runs a free public-side scan of AI-built apps. It never signs in, so it reads the same files a visitor gets, and it can flag secret-shaped strings in the shipped JavaScript. That is a good check after a redeploy. It cannot see your dashboard settings.
