Getting started with Azure CDN

This article describes how to enable Azure CDN by creating a new CDN profile and endpoint.

Important

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.

Note

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

  1. In the Azure portal, in the upper left, select Create a resource.

  2. In the New blade, select Web + Mobile, then CDN.

    The CDN profile blade appears.

    New CDN Profile

  3. For Name, enter a unique name for your CDN profile.

  4. For Subscription, select the subscription to use for this CDN profile.

  5. For Resource group, select or create a resource group. For information about resource groups, see Azure Resource Manager overview.

  6. For Resource group location, select the Azure location to store your CDN profile information. This location has no impact on CDN endpoint locations.

  7. For Pricing tier, select a tier. For a comparison of the features available with each pricing tier, see Azure CDN features.

    CDN pricing tier selection

  8. 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.

  9. If you want to save the profile to your dashboard after it is created to make it easier to find, select Pin to dashboard.

  10. Select Create to create the profile.

Create a new CDN endpoint

To create a new CDN endpoint

  1. 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.

    CDN profile

  2. Click the Add Endpoint button.

    Add endpoint button

    The Add an endpoint blade appears.

    Add endpoint blade

  3. Enter a Name for this CDN endpoint. This name is used to access your cached resources at the domain <endpointname>.azureedge.net.
  4. 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).

    CDN origin type

  5. 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.
  6. 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.
  7. In the Origin host header, enter the host header you want the CDN to send with each request, or leave the default.

    Warning

    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.

  8. 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.

    Note

    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 Configure HTTPS on an Azure CDN custom domain.
  9. Click the Add button to create the new endpoint.

    After the endpoint is created, it appears in the list of endpoints for the profile.

    CDN endpoint

    Important

    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.

See Also