Change domain or subdomain
Learn how to change your Clerk production instance's domain or subdomain.
Change domain
- Update your production domain in two ways:
- the Clerk Dashboard
- the Backend API
- Once you make the change to your domain, you will need to update the following:
- Update DNS records
- Generate new SSL certificates
- Update your publishable key
- If using social connections, update the settings with your social connections so that the redirect URL they are using is correct.
- If using JWT templates, update JWT issuer and JWKS endpoint in external JWT SSO services.
Update your domain via Clerk Dashboard
To update your production domain in the Clerk Dashboard:
- In the navigation sidebar, select Domains.
- Select the Danger tab.
- Select Change domain.
Update your domain via backend API
To update your production domain using the Backend API, you will need to make a POST request to the change_domain
endpoint. You will need to provide your new domain in the request body.
- Copy the following cURL command.
- Replace
YOUR_PROD_URL
with your new production domain.
For more information on how to update your instance settings using the backend API, see the backend API reference.
Update your publishable key
After changing your domain, a new Publishable key will be automatically generated for your application. You will need to update your environment variables with this new key and redeploy your application. You can find your Publishable key on the API Keys page of the Clerk Dashboard.
Set, change, or remove subdomain
To set, change, or remove a subdomain for your production instance:
- Navigate to the Clerk Dashboard.
- In the navigation sidebar, select Domains.
- Select the Danger tab.
- You will see the Change subdomain section where you can set, change, or remove your subdomain.
Feedback
Last updated on