Create a CNAME DNS Record in cPanel
Setting up a cPanel CDN combination is easy and can be done in just a few steps. If you do not plan to use a Zone Alias (e.g.
cdn.yourwebsite.com) there is no need to do anything in cPanel and you can move on directly to integrating the CDN with your website. However, if you want to use a Zone Alias, you will need to create a CNAME cPanel record. To do this you have two options (either simple DNS editor or advanced DNS editor), follow the steps below to create a CNAME DNS record in cPanel.
- Log in to your cPanel and search for DNS ZONE.
- Pick one of the two options : Simple DNS Zone Editor or Advanced DNS Zone Editor.
- If you choose Simple DNS Zone Editor, these are the steps:
Pick your domain name (if applicable).
Go to Add a CNAME Record.
In the Name field, enter the prefix/first part of your custom domain (cdn, keycdn, or whatever you have - do NOT enter the FQDN like cdn.yourwebsite.com, cPanel will auto-complete that for you.
In the CNAME field, add your CDN domain like example-hexid.kxcdn.com, do NOT suffix it with a period/dot.
Click the Add CNAME Record button.
- If you pick Advanced DNS Zone Editor, follow these steps:
Choose your domain name (if applicable).
Go down to Add a Record.
In the Name field, enter the prefix/first part of your custom domain (cdn, keycdn, or whatever you have - do NOT enter the FQDN like cdn.mydomain.com, cPanel will auto-complete that for you.
In the TTL box, add 14400 (4 hours) or more.
In the Type drop down menu, select CNAME.
Click on the Add CNAME Record button.
In the CNAME box, add your temporary CDN domain example-hexid.kxcdn.com, do NOT suffix it with a period/dot.
Click the Add Record Button.
That's it! Now that you have set up your CNAME cPanel record you can begin using your Zone Alias instead of the default Zone URL. If you have previously integrated your website with the CDN Zone URL, ensure that you update all URLs with the newly created CNAME cPanel hostname (e.g.
cdn.yourwebsite.com) for integration purposes within your website.