Use Case: How to Set Up the Static Content Distribution
Follow these steps to set up option:
- Move site static to a separate domain (such as
static.example.com- this will be the content source). If you use Cloud Storage, creating a separate domain for the source is optional.
- Create a domain like
cdn.example.comto work through the CDN.
- Create a CDN resource in the Control panel.
Configure your DNS Registrar’s CNAME record with
cdn.example.comto the domain of the CDN provider that the CDN provider allocates when connecting. For example, if you use CDN Selectel, such a domain looks like
85e77c09-bc03-43bf-b8f3-9492ae33390f.selcdn.net, where 85e72c09-bc03-43bf-b8f3-9492ae33390f is generated automatically.
An example entry:
cdn.example.com in 85e77c09-bc03-43bf-b8f3-9492ae33390f.selcdn.net
digcommand in a terminal or use online services to check if the entry is correct. If you set the CNAME correctly, you will see an entry:
cdn.example.com 14399 IN CNAME 85e77c09-bc03-43bf-b8f3-9492ae33390f.selcdn.net
In your site settings, change the domain for the statics that you plan to serve through the CDN to
As a result, the user types the
www.example.com address, from which they receive the HTML page, in the browser line. In this case, all static content, for example, graphic images, is loaded from the CDN (from the