Very learning, much smart, so motivation

Your custom domain with Azure CDN

We are now going to add a custom domain (one that you own) to the CDN endpoint so our users don’t have to use the … URL to access the site. Detailed instructions can be found here, in this post I will condense this info:

Note: In this post my custom domain is and my CDN endpoint hostname is:

  1. Navigate to your domain provider’s DNS settings and add the following CNAME record:

    Source Type Destination CNAME

    Note: In the Source section change to the custom domain that you want to link to the CDN endpoint and update the Destination from to the CDN endpoint hostname (in the format cdnverify.{endpoint name} For example:

    domain provider DNS

  2. In the Azure Portal navigate to your CDN endpoint and tap the ‘Custom domain’ button

    Azure CDN Endpoint Custom domain

    In the Custom hostname' field input your custom domain, for example:

    Add a custom domain

    Azure will now verify that the CNAME record exists for the custom hostname that you entered. It will verify if a record exists for cdnverify.{your custom domain}

    Note: At this stage the CDN endpoint is still not linked to your custom domain

  3. At this point, your custom domain has been verified by Azure (using the cdnverify subdomain DNS entry), but traffic to your domain is not yet being routed to your CDN endpoint. After waiting long enough to allow the custom domain settings to propagate to the CDN edge nodes (90 minutes for Azure CDN from Verizon, 1-2 minutes for Azure CDN from Akamai), return to your DNS registrar’s web site and create another CNAME record that maps your subdomain to your CDN endpoint (detailed into here). For example:

    Custom domain DNS entry

  4. Delete the cdnverify CNAME record from your domain register (what we did in step 1)

  5. Optional: Let Azure create & manage a TLS cert for your site (fun fact: this is free):

    Wait for the DNS record to propagate (i.e. when you can navigate to your custom domain and you see your CDN endpoint site then it has propagated). We will now assign a TLS cert to your custom domain (so your website is nice and secure). Tap the ‘Custom domain’ menu item for your CDN endpoint and switch the ‘Custom domain HTTPS’ option to ‘On’ and leave the other options as the defaults (then press the Save button), for example:

    Custom domain HTTPS

    Note: If your CDN endpoint only supports the HTTPS protocol (mine did), your site will be down (the user’s browser will display the below screen) until Azure verifies, creates and assigns a TLS cert to your custom domain.

    Note: It too Azure 5-10 mins to verify, create and assign the cert and then the below prompt disappeared.

    Custom domain with no TLS cert

    Since the site was down I could have skipped step 1 (i.e. I should have done the steps in this order: 3, 2; steps 1 and 4 are not required if you don’t mind your site being down for a short period of time).

    The final product :)

    Custom domain with valid TSL cert


Loading comments...