Creating custom CDN hostnames

A CDN Hostname is a unique domain name from which PUSHR CDN serves your content to your visitors. When you create a new CDN zone, PUSHR generates this name automatically in the cxxxxzxxxx.r-cdn.com format, where the part before .r-cdn.com is the unqiue identifier of your CDN zone. You can start using this new hostname right away, but in some situations you may prefer to brand your CDN hostname for a more professional look. For example, if you operate the website located at example.com you may prefer to use a hostname like cdn.example.com instead of the default cxxxxzxxxx.r-cdn.com

The process of branding your CDN hostname is easy. You need to create the desired new hostname by creating a DNS record with your name server provider, and then point the new record to the default CDN hostname for your zone. Here is how to do this step by step.

1. Create a CNAME record

To start you need to create a new DNS record with your name servers provider. This usually is the hosting provider where you host your website, unless you are using a separate service for your DNS (like HE, Cloudflare, VULTR cloud, etc.)

First, copy the default CDN hostname of your CDN zone. Inside your PUSHR account, click on CDN on the sidebar, then click on the CDN zone that you want to create a custom hostname for, and open the Origins & Hostnames tab. The default hostname will be listed there:

It is now time to visit your name server provider's control panel to create the new DNS record. Different providers have different control panels, here is how to do it with the most popular options:

Cpanel


Scroll down to the Domains section in your Cpanel account. Click on Zone Editor:
Creating a CNAME record inside Cpanel
Click on the +CNAME RECORD button next to the domain for which you will be creating the new CDN hostname:
Creating a CNAME record in Cpanel - 2
In the box that opens up, set Name to be the desired custom hostname. Then paste your default CDN hostname that you copied from your PUSHR account inside CNAME:
Setting a CNAME record in Cpanel - 3

Save your settings by clicking the ADD A CNAME RECORD button and continue to step 2 below.

Direct Admin


Inside your Direct Admin control panel, click on Account Manager, then DNS Management, then the Add Record button:
Create a CNAME record in Direct Admin 1
In the window that opens, select the Record Type to be CNAME, set the Name to the desired new CDN hostname and enter the copied default CDN hostname inside the Value field:
Creating a CNAME record in Direct Admin 2

Cloudflare


Visit your Cloudflare control panel and click on the DNS button:
Creating a CNAME record in Cloudflare 1
Then click on the +Add record button. Select Type to be CNAME, enter the desired new hostname name in the Name field, and paste your default CDN hostname in the Target field:
Creating a CNAME record in Cloudflare

The Proxy status setting should be set to DNS only (grey cloud) for best performance. If CNAME Flattening is enabled, it has to be disabled for your new CDN hostname to work.

2. Wait for the new record to propagate on the internet

After the creation of your new DNS record, your name server provider may take some time to publish the changes to the internet. The time that it takes varies, and may be up to 48 hours, but it often takes no more than an hour. If you try to add the new hostname to your PUSHR CDN zone before the record has propagated, PUSHR will return an error:
Error: The CNAME record could not be resolved

3. Configure your CDN zone to use the new hostname

Click on the Add another hostname button right under the default hostname in your PUSHR CDN dashboard. In the box that appears enter the new hostname (In this example it is cdn.example.com ). Click the Create button and the box will close.

Your new CDN hostname will show up under the default hostname on the page:
PUSHR CDN custom CDN hostname

It will take a few minutes for your new hostname to become active on PUSHR's edge network. Once it does, all your content will be available from your new hostname.
Your default hostname will continue to function properly and you will be able to replace the links in your website, service or app without downtime.

4. Optional: Enable HTTPS with free SSL certificate

Once your hostname is up and running, you may decide to enable HTTPS on it. This is particulaty important if you will be using the hostname on web pages that are accessible over HTTPS where using plain HTTP will result in Mixed Content browser errors. 
PUSHR uses Letsencrypt - a free certificate authority - to issue SSL certificates for your CDN hostnames. Click on the HTTPS dropdown on the right of the newly created hostname and a certificate will be issued automatically:
Custom SSL certificate with Letsencrypt

It will take a few minutes for the SSL certificate to be issues for your new hostname. Once it does, all your content will be available from your new hostname over HTTPS.