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_KEY and CLERK_SECRET_KEY.
  • The secret was given a NEXT_PUBLIC_ or VITE_ 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

  1. In the Clerk Dashboard, switch to the Production instance and copy the production publishable key and secret key.
  2. On the host, set NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY to the pk_live_ value and CLERK_SECRET_KEY to the sk_live_ value. Clerk's environment-variable guide uses those names for Next.js. A Vite app uses VITE_CLERK_PUBLISHABLE_KEY for the publishable key. Keep the secret unprefixed.
  3. Redeploy. Clerk says the new values have to be in the host's environment and the app has to be redeployed.
  4. 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

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.

See products