Getting started with Azure CDN
This article describes how to enable Azure CDN by creating a new CDN profile and endpoint.
For an introduction to CDN and a list of features, see CDN Overview.
Create a new CDN profile
A CDN profile is a collection of CDN endpoints. Each profile contains one or more CDN endpoints. You may wish to use multiple profiles to organize your CDN endpoints by internet domain, web application, or some other criteria.
An Azure subscription has default limits for the following resources:
- The number of CDN profiles that can be created
- The number of endpoints that can be created in a CDN profile
- The number of custom domains that can be mapped to an endpoint
For information about CDN subscription limits, see CDN limits.
CDN pricing is applied at the CDN profile level. If you wish to use a mix of Azure CDN pricing tiers, you will need multiple CDN profiles.
To create a new CDN profile
In the Azure Portal, in the upper left, click New. In the New blade, select Web + Mobile, then CDN.
The new CDN profile blade appears.
- Enter a name for your CDN profile.
- Select a Location. This is the Azure location where your CDN profile information will be stored. It has no impact on CDN endpoint locations.
- Select or create a Resource Group. For more information on Resource Groups, see Azure Resource Manager overview.
Select a Pricing tier. See the CDN Overview for a comparison of pricing tiers.
- Select the Subscription for this CDN profile.
- Click the Create button to create the new profile.
Create a new CDN endpoint
To create a new CDN endpoint
In the Azure portal, navigate to your CDN profile. You may have pinned it to the dashboard in the previous step. If you not, you can find it by clicking Browse, then CDN profiles, and clicking on the profile you plan to add your endpoint to.
The CDN profile blade appears.
Click the Add Endpoint button.
The Add an endpoint blade appears.
- Enter a Name for this CDN endpoint. This name is used to access your cached resources at the domain
In the Origin type dropdown, select your origin type. Select Storage for an Azure Storage account, Cloud service for an Azure Cloud Service, Web App for an Azure Web App, or Custom origin for any other publicly accessible web server origin (hosted in Azure or elsewhere).
- In the Origin hostname dropdown, select or type your origin domain. The dropdown lists all available origins of the type you specified in step 4. If you select Custom origin as your Origin type, enter the domain of your custom origin.
- In the Origin path text box, enter the path to the resources you want to cache, or leave blank to allow cache any resource at the domain you specified in step 5.
In the Origin host header, enter the host header you want the CDN to send with each request, or leave the default.
Some types of origins, such as Azure Storage and Web Apps, require the host header to match the domain of the origin. Unless you have an origin that requires a host header different from its domain, you should leave the default value.
For Protocol and Origin port, specify the protocols and ports used to access your resources at the origin. At least one protocol (HTTP or HTTPS) must be selected. Use the CDN-provided domain (
<endpointname>.azureedge.net) to access HTTPS content.
The Origin port only affects what port the endpoint uses to retrieve information from the origin. The endpoint itself is only available to end clients on the default HTTP and HTTPS ports (80 and 443), regardless of the Origin port.
Azure CDN from Akamai endpoints do not allow the full TCP port range for origins. For a list of origin ports that are not allowed, see Azure CDN from Akamai Allowed Origin Ports.
Accessing CDN content using HTTPS has the following constraints:
- You must use the SSL certificate provided by the CDN. Third-party certificates are not supported.
- HTTPS support for Azure CDN custom domains is available only with Azure CDN from Verizon products (Standard and Premium). It is not supported on Azure CDN from Akamai products. For more information, see Enable or disable HTTPS on an Azure CDN custom domain.
Click the Add button to create the new endpoint.
After the endpoint is created, it appears in the list of endpoints for the profile.
Because it takes time for the registration to propagate, the endpoint will not be immediately available for use. For Azure CDN from Akamai profiles, propagation usually completes within one minute. For Azure CDN from Verizon profiles, propagation usually completes within 90 minutes, but in some cases can take longer.
Users who try to use the CDN domain name before the endpoint configuration has propagated to the POPs can receive HTTP 404 response codes. If it's been several hours since you created your endpoint and you're still receiving 404 responses, see Troubleshooting CDN endpoints returning 404 statuses.