CDN setup considerations

Current version: 10.0

If you are considering setting up a Microsoft Azure® Content Delivery Network (CDN) for the Sitecore Media Library, using either Azure Marketplace or Sitecore Azure Toolkit, you can choose between having Sitecore set up a CDN for you, or bringing your own CDN.

If you are considering setting up a CDN manually (without using Azure Marketplace or Sitecore Azure Toolkit), you will need to set up a CDN yourself. 

Considerations when Sitecore sets up a CDN for you

When Sitecore sets up a CDN for you, using Azure Marketplace or Sitecore Azure Toolkit, you can choose the pricing tier through Content Delivery Network pricing. Other considerations also include the different Azure CDN product features and the Azure CDN point of presence (PoP) locations by region.

Note

In some cases, you may need to set up some of the pricing tiers post-deployment. If so, refer to the information in Azure Marketplace or Sitecore Azure Toolkit, (depending on your deployment method).

If you are using Sitecore Azure Toolkit then refer to the caching rules for Premium Verizon. You can find the caching rules for other vendors here.

Considerations when you set up a CDN yourself

If you set up a CDN yourself, you can use the CDN endpoint URL to set up the Sitecore Media Library to use a CDN. You can use any CDN provider, including Azure CDN. To set up an Azure CDN yourself, work through Quickstart: Create an Azure CDN profile and endpoint.

When you set up a CDN endpoint, regardless of which CDN provider you use, ensure that you:

  • Cache every unique URL - The CDN endpoint must be configured to cache every unique URL, including path and query string. When Sitecore creates a link to a media item, it uses the revision number in the query string (rev) as a cache key. This means a new URL is generated with each revision of an item. This prevents a CDN from returning old revisions. To enable caching for every unique URL for an Azure CDN endpoint, see Control Azure CDN caching behavior with query strings - standard tier.

  • Respect existing cache headers in the response - The CDN endpoint must be configured to respect the cache headers, (if they exist). When the Sitecore media request handler responds to a request, it sets the cacheability, max-age, and expiration cache headers. This means, for example, that the media request handler will set all non-public items, to private to prevent caching a non-public item on a CDN. To set up cache behavior settings for an Azure CDN endpoint see Caching behavior settings

    Note

    If the value of Caching behavior for an Azure CDN endpoint is missing, you must set it to Not set.

Do you have some feedback for us?

If you have suggestions for improving this article,