Setting up a custom asset domain enables you to serve assets to your visitors using your custom domain instead of the default Kontent.ai asset domain. The links on your webpage will look more trustworthy and have better SEO. Contact us to set up a custom asset domain.
Why custom domain
Asset domain is the domain from which you serve assets such as images, videos, or PDF documents. The main benefits of having a custom domain for your asset links are higher credibility and better SEO:
When visitors open your asset in a new tab and see its URL in full, they'll see that it's associated with your company – unlike when it's served from Kontent.ai's default asset domain. This helps to avoid confusion and makes the links look more trustworthy and official.
Assets served from your own domain have better search engine optimization because they can be associated with your homepage.
Custom domains and SDKs
URLs with a custom domain are available only when using an SDK for the Delivery API. If you retrieve content using the Delivery API directly without an SDK, the assets will still have the default URLs. You can use your custom domain without an SDK, but you need to replace the domain part of the URL in your app yourself. For example, let's say you want to use the custom domain assets.example.org:
The Delivery API returns the absolute asset URL https://assets-us-01.kc-usercontent.com/ID1/ID2/kontent_ai.png.
You need to replace the domain part of that URL (that is assets-us-01.kc-usercontent.com) to get https://assets.example.org/ID1/ID2/kontent_ai.png.
Our SDKs for the Delivery API take care of this automatically.
Set up a custom asset domain
Custom asset domain is an additional feature of Kontent.ai. One custom asset domain is available for every subscription with Advanced asset management. If you need more custom domains, you can purchase them additionally. To set up a custom domain, contact us using the button below so that we can start the activation process.The activation is not immediate and requires cooperation from your side. To successfully set up the custom domain, you'll need to complete the following steps.
1. Choose your domain and select projects
Choose the custom domain you want. It should be a subdomain of the domain you own. For example, if your domain is customer.com, a valid custom asset domain could be assets.customer.com or resources.customer.com.Select projects for which you want to use the custom domain. You can have multiple projects with one domain, or you can use a separate domain for each project. You can also first test it with one project and have us set up more domains later.
2. Set up your DNS
Contact our support using the button in the bottom right and provide details of your desired setup. We'll then start with the configuration on our side. You'll need to pass the ACME DNS challenge to prove that you own the domain so that we can earn a certificate for serving your assets via HTTPS. For the challenge, we'll provide you with a CNAME configuration that you'll need to add to your DNS. You will need to keep this record in your DNS permanently for automatic re-verification.After the verification is complete, we'll send you another CNAME record that you'll need to add to your DNS. This one will point your custom asset domain to our servers. When you confirm that the CNAME record is in your DNS configuration, we'll set things up on our side. From this point on, you'll see your custom domain in asset details in Kontent.ai.
3. Update your SDK configuration
The last thing for you to do is to add the custom domain to your SDK configuration. When you're done, the assets you retrieve in your app will have URLs with the custom domain. In case you're not using an SDK, you need to implement replacing the domain in your asset URLs yourself.After this, the setup is done. Your assets now have your custom domain in their URLs.
Even with a custom domain in place, your assets are still accessible using the default asset domain. We can also set up redirects to your custom domain if you have the default asset URL hardcoded somewhere in your app.
Please note that you can't use a custom asset domain together with the environment swap feature. That's because, after each swap, it'd be necessary to set up new HTTPS certificates.
Custom asset domains can be set up only for the production environment.