Skip to main content

Add a personal domain to a CDN resource

Last update:
  1. Register a domain.
  2. Create a CNAME record in DNS hosting.
  3. Add a personalized domain in the control panel.
  4. Add a (TLS)SSL certificate to the CDN resource.
  5. Replace the domain in the links on the site.

1. Register a domain

If you don't already have a domain that you want to use as a personal domain, register it. You can register a domain with Selectel.

If you already have a domain, go to the next step.

2. Create a CNAME record in DNS hosting

Only a subdomain for the main domain can be used as a personal domain, e.g. cdn.example.com for example.com. You cannot use the main domain as a personal domain.

  1. Open the domain settings:

    • if you have delegated a domain to Selectel, go to the Selectel control panel: in the top menu, click ProductsDNS hostingDomain zones section;
    • if the domain is managed in another DNS hosting, open the control panel of this DNS hosting.
  2. Create a resource record. Specify:

    • record type is CNAME;

    • record name is a subdomain of the form cdn.example.com;

    • value - default domain of the form *.selcdn.net. Specify a domain without protocol, for example cdn.example.com. Allowed length of each level of the domain - 63 characters. The length of all levels must not exceed 253 characters.

      You can view the default domain in the Control Panel: in the top menu, click ProductsCDNCDN Resources section → the domain will be listed in the resource bar.

3. Add a personal domain in the control panel

  1. In the Control Panel, on the top menu, click Products and select CDN.

  2. In the CDN Resources section, open the resource page → Main tab.

  3. In the Personal Domain block, click Add Personal Domain.

  4. Specify the personal domain for which you configured the record.

  5. Click Apply.

4. Add a TLS(SSL)-certificate to a CDN resource

  1. In the Control Panel, on the top menu, click Products and select CDN.

  2. Go to Certificates for CDN resources.

  3. If you want to issue a Let's Encrypt certificate:

    3.1 On the menu, click Issue Let's Encrypt Certificate.

    3.2 Select the CDN resource for which you want to issue a certificate.

    3.3 Click Release.

  4. If you want to download a personalized certificate:

    4.1 From the menu, click Upload Personal Certificate.

    4.2 Specify a name for the certificate. It will be used only in the control panel.

    4.3 Add a certificate for the domain. It must start with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.

    If you want to add multiple certificates, make sure that all certificates (the primary certificate for the domain, intermediate certificates, and the root certificate) create a complete chain. The Issuer value of the primary certificate must match the Subject value of the first intermediate certificate, the Issuer value of the first intermediate certificate must match the Subject of the second intermediate certificate, and so on.

    4.4 Add a private key. It must start with -----BEGIN PRIVATE KEY----- and end with -----END PRIVATE KEY-----.

    4.5. Click Upload.

  5. Go to the CDN Resources section.

  6. Open the CDN resource page → Certificates tab.

  7. Check the Distribute over HTTPS via CNAME checkbox.

  8. In the Certificate field, select the certificate that you issued in step 3 or uploaded in step 4.

  9. Click Apply. The resource will be in PROCESSING status while the settings are being applied . You cannot apply any other settings at this time. The settings will be applied when the share changes to ACTIVE status.

    You can view certificate information in the control panel: in the top menu, click Products and select CDNCDN resources → resource page → Certificates tab.

If you selected your own content source when you created the resource, replace the domain in the URL of the static site files with the personal domain of the form cdn.example.com that you specified in step 3 when you created the CNAME record in step 2:

If the site is on a CMS, use a URL replacement plugin, if not, replace the URL in the site code.