Clerk production deploy is still using pk_test_ keys
The live site still talks to the Clerk development instance? Production keys are pk_live_ and sk_live_, and the host has to be redeployed after you change them.
Reviewed October 15, 2026
What it means in plain English
Clerk has a development instance and a production instance, and they do not share keys. Clerk's production guide says a common deploy mistake is leaving the development keys in place. Development publishable keys start with pk_test_. Production publishable keys start with pk_live_. The matching secret keys are sk_test_ and sk_live_.
Likely causes
- The host still has the development
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEY. - The secret was given a
NEXT_PUBLIC_orVITE_prefix. Clerk says not to expose the secret key on the frontend. - The variables were updated and the site was not redeployed, so the old build is still running.
How to fix it, step by step
- In the Clerk Dashboard, switch to the Production instance and copy the production publishable key and secret key.
- On the host, set
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYto thepk_live_value andCLERK_SECRET_KEYto thesk_live_value. Clerk's environment-variable guide uses those names for Next.js. A Vite app usesVITE_CLERK_PUBLISHABLE_KEYfor the publishable key. Keep the secret unprefixed. - Redeploy. Clerk says the new values have to be in the host's environment and the app has to be redeployed.
- Do not commit
sk_live_into the repository.
How to check it worked
- The deployed page's Clerk script is using a
pk_live_key. - A production user can sign in, and the development instance is no longer the one receiving that traffic.
Stripe has the same test-versus-live split. A live key with a test price id returns a different error. See No such price: test mode vs live mode.
Sources
Related fixes
Keep going on your own.
The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.