By default, Kinde issues a Kinde subdomain when you first register. But for your production environment you can use your own domain instead of Kinde’s as your URL. For example, account.example.com instead of example.kinde.com.
There are a few reasons you may wish to do this.
- It will give your users the impression they have never left your application to authenticate, creating a seamless user experience.
- For Single Page Applications (SPAs) it means we can securely set a first party cookie meaning authentication state persists for full-page refreshes and new tabs.
- If you also register the domain in the configuration for any social providers you are using, the social providers auth screen will be customized with your app details.
- Go to Settings > Environment > Custom domain. The Custom domain page opens.
- Enter your Domain name.
- Select Get DNS details. The DNS details appear.
- Go to your domain provider website and create CNAME DNS records using the DNS details. Apologies that we can’t offer instructions for all situations, as this will be different depending on your provider. But here are the setup steps for Godaddy, Cloudflare, and NameCheap.
- Once you have created the DNS entries, go back to Kinde and select Verify. The verification process can take up to a couple of hours. When it completes, the verification status will change and an SSL certificate will be provisioned. Your domain will then be used instead of Kinde’s. You will also receive an email notification when the process is complete.
- If you encounter any errors, such as the verification taking too long, re-check the DNS records you created on your provider site, to ensure the details are correct.
- Update your code to use the custom domain rather than the Kinde issued subdomain.
- If you have any custom configuration for social providers you should also update the callback URLs with the providers to use the custom domain.