Open the settings of a CDN resource by clicking on the resource block.
After creating the CDN resource, a «default domain» of the form ***.selcdn.net or ***.akamaized.net will be generated, depending on the selected provider. You can see the «default domain» on the Domains tab.
Through the «default domain» content is distributed via https. For example, on the main server (content source), in the «photos» folder there is a cat.jpg file. In order to distribute this file via CDN, you can use an address of the form ***.selcdn.net/photos/cat.jpg.
In addition to distributing through the «default domain», it is possible to connect a «personal domain» and distribute files through it.
To add a «personal domain» in the CDN-resource card, go to the Domains tab, click Attach domain and enter the domain name.
Please note that you can use at least third level domains as «personal domains».
To activate the «personal domain», create a CNAME record at your DNS provider.
Adding Multiple Content Origins
If you select your web server as the content source, you can add additional content sources. Follow these steps:
- Click Edit origin.
- Enter Domain and Port of the domain connection.
- Save your changes.
Please note that Akamai cannot use multiple content sources.
Host header is the header that CDN servers use when requesting content from a source. It allows you to configure the flexible delivery of content depending on the value of the header.
There are two options for configuring the Host header:
- **Custom Host header ** — this option is selected by default when creating a resource. The Host header value is automatically substituted depending on the data source. You can enter your own header value.
- Forward Host header — when requesting a source, the Host header will leave the value that came in the CDN request.
The content source server should allow requests with the specified header. To verify that the title is correct, enter the following command:
curl -I -H "Host:cdn.site.com" https://origin.site.com
cdn.site.comis the header indicated in Host header;
https://site.ruis the domain or original IP.
Verify that the server can handle the specified header.
Content compression will reduce content delivery time. Depending on the request parameters, the client will receive a compressed or uncompressed file:
- On CDN — files will be compressed on CDN servers using gzip;
- On origin — files will be compressed on the source.
File extensions that support compression:
Image file formats (jpeg, jpg, png) supported by web files, as well as videos, PDFs and other binary formats, are already compressed. Using gzip on them does not provide additional benefits.