A custom domain is a domain name used for content delivery through a CDN. For example, if you have a website with the domain mywebsite.com, you create a CDN resource for static content delivery and specify a custom domain for the resource, such as cdn.mywebsite.com. This way, your static assets will be delivered to end-users with URLs like cdn.mywebsite.com/sample.jpg.
When specifying a custom domain, you can use any domain or subdomain for which you can edit the DNS records (typically, our clients use a third-level subdomain based on the website domain).
Note: The main custom domain must be specified when creating the CDN resource and cannot be changed afterward. If you want to use a different domain, you’ll need to add multiple domains. Learn how to do this in the Specify additional domain module.
1. When creating a CDN resource, enter your desired domain or subdomain name in the "Custom domain" section (Step #3). You can also specify multiple domains by clicking the "+" icon.
2. Continue with the creation of the CDN resource.
3. Copy the value cl-****.gcdn.co (which is unique for every account and the same for all custom domains of your account) from the "Set up your DNS" page. You can click Confirm at this step or later.
4. Go to your DNS provider’s website.
5. Create a CNAME record for the custom domain with the value copied in step 3 of this guide. The CNAME record should be specified as follows:
cdn mywebsite.com. cl-****.gcdn.co
Replace cl-****.gcdn.co will the value specific to your account.
If you specified multiple custom domains in step 1, add CNAME records for all additional custom domains.
You can use the
dig command in the terminal or an online dig tool to check the record. If the record was added correctly, you should receive a response similar to the one specified above.
6. Complete the CDN resource creation. You will see the following pop-up when all configurations are completed:
The "Setup Guide" will help verify that the configuration was completed successfully. If you see this message, this indicates that something is incorrect or missing in the configuration.
1. Open the settings of the created CDN resource.
2. Click on "Setup guide".
3. A drawer will open, displaying each step of the configuration process. A check mark indicates that the step was successful. If there is no check mark, click on the step and follow the instructions to complete the configuration. When the setup is finished, click Check DNS Setup Status.
To check the front end of your integrated website, right-click on any static files and choose "Inspect". This will show you the content delivery URL where your file is served.
1. Go to the CDN resource list and click on the custom domain of the resource you want to configure.
2. In the "Custom domain" section, click the plus sign (+) next to the "Domain" field and enter your desired domain name. You can add several domains.
3. Click Save changes at the bottom of the page.
Note: You need to add a CNAME record to your DNS following the instructions above for each additional domain.
Once the additional domains are set up, you can configure your website to deliver different types of static files from separate domains.
Was this article helpful?
Learn more about our next-gen CDN