Getting started with Azure CDN
This article describes how to enable Azure Content Delivery Network (CDN) by creating a new CDN profile and endpoint.
Create a new CDN profile
A CDN profile is a collection of CDN endpoints. Each profile can contain one or more CDN endpoints. To organize your CDN endpoints by internet domain, web application, or some other criteria, you can use multiple profiles.
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. Therefore, to use a mix of Azure CDN pricing tiers, you must create multiple CDN profiles.
To create a new CDN profile
In the Azure portal, in the upper left, select Create a resource.
In the New blade, select Web + Mobile, then CDN.
The CDN profile blade appears.
For Name, enter a unique name for your CDN profile.
For Subscription, select the subscription to use for this CDN profile.
For Resource group, select or create a resource group. For information about resource groups, see Azure Resource Manager overview.
For Resource group location, select the Azure location to store your CDN profile information. This location has no impact on CDN endpoint locations.
For Pricing tier, select a tier. For a comparison of the features available with each pricing tier, see Azure CDN features.
Optionally, select Create a new CDN endpoint now to display the options for creating an endpoint at the same time that you create the profile. For more information, see Create a new CDN endpoint.
If you want to save the profile to your dashboard after it is created to make it easier to find, select Pin to dashboard.
Select Create to create the 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 not, you can find it by selecting All services, then selecting CDN profiles. In the CDN profiles pane, select the profile to which you plan to add your endpoint.
The CDN profile pane appears.
The Add an endpoint pane appears.
For Name, enter a unique name for the new CDN endpoint. This name is used to access your cached resources at the domain
For Origin type, select an 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).
For Origin hostname, select or enter your origin domain. The drop-down lists all available origins of the type you specified in step 4. If you selected Custom origin as your origin type, enter the domain of your custom origin.
For Origin path, enter the path to the resources you want to cache, or leave it blank to allow caching of any resource at the domain you specified in step 5.
For Origin host header, enter the host header you want Azure 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 value determines only the port the endpoint uses to retrieve information from the origin. The endpoint itself is available only to end clients on the default HTTP and HTTPS ports (80 and 443), regardless of the Origin port value.
Endpoints in Azure CDN from Akamai profiles do not allow the full TCP port range for origin ports. For a list of origin ports that are not allowed, see Azure CDN from Akamai Allowed Origin Ports.
When you access CDN content by using HTTPS, there are the following constraints:
- 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 Configure HTTPS on an Azure CDN custom domain.
Select Add 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 isn't 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.
If you attempt to use the CDN domain name before the endpoint configuration has propagated to the POPs, you might receive an HTTP 404 response status. If it's been several hours since you created your endpoint and you're still receiving a 404 response status, see Troubleshooting CDN endpoints returning 404 statuses.