If you would like to use in the website code your domain, for example, cdn.example.ru/images.png instead of 123456789.r.worldcdn.net/images.png, add a CNAME record to your DNS settings and point it to the CDN domain.
cdn.example.ru. CNAME 123456789.r.worldcdn.net.
Please note that the CNAME should differ from an origin source. Check the record before using it for content delivery.
Check CNAME Record
There are several options to check your CNAME.
Use online services
For example, http://www.digwebinterface.com/
In the Hostnames or IP addresses field specify your CNAME, choose the CNAME type, click All in Nameservers and press Dig.
If the CNAME was added in a right way, you will see the record as follows
cdn.site.ru 14399 IN CNAME 123456789.r.worldcdn.net.
Use the command line
For Windows users
- Open the command line
Press Start -> Run, enter cmd and press Enter.
- In the command line enter nslookup -type=cdn.site.ru (specify your CNAME instead of cdn.site.ru)
If you see cdn.site.ru canonical name=123456789.r.worldcdn.net in the answer section, the record was added properly.
If you see *** UnKnown can't find cdn.site.ru: Non-existent domain, CNAME was not added in a proper way. Check your DNS settings or contact your hosting provider support.
For *NIX systems
- Open the terminal
- In the terminal run the command
dig CNAME cdn.site.ru (specify your CNAME instead of cdn.site.ru)
An example of the answer if the settings are right
cdn.site.ru 14399 IN CNAME 123456789.r.worldcdn.net
If you see other answers, check your DNS settings or contact your hosting provider support.
As soon as your CNAME is added to the DNS and provisioned, you can use it to integrate your website with the CDN.