API
The Gcore Customer Portal is being updated. Screenshots may not show the current version.
CDN
CDN
BillingCDN resources overviewOrigin groupPurgePrefetchReports
API
Chosen image
Home/CDN/CDN resource options/General/Create a custom domain (CNAME)

Create and set a custom domain for the content delivery via CDN

What is a custom domain?

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.

Set a custom domain

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.  

Custom domain

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.

Copy the value

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:

Complete the CDN resource creation

Check the DNS setup status

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".

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.

Setup Status
  • If you see the message "DNS record hasn’t been set up", something has gone wrong. Please check the DNS hosting settings.
check the DNS
  • If you see the message "DNS record has been successfully set up", the configuration has been completed correctly.
completed correctly

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.

Specify additional domain

1. Go to the CDN resource list and click on the custom domain of the resource you want to configure.

CDN resource list

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.

Custom domain

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?

Not a Gcore user yet?

Learn more about our next-gen CDN

Go to the product page