Manually configure the Sitecore Media Library to use a CDN
This topic describes how to manually set up the Sitecore Media Library so it can use a Microsoft Azure® Content Delivery Network (CDN). This is helpful if you have an existing on-premise or Azure-deployed Sitecore instance, and you want to enable the Sitecore Media Library to use a CDN.
If you are going to deploy a new instance of Sitecore XM or an XP scaled configuration on Azure, you do not need to set it up manually. Instead, you can use one of the following options:
Prerequisites
Prerequisites
Before you can set up the Sitecore Media Library to use a CDN, you must:
-
Ensure you are running Sitecore XP and XM 9.1 or later.
Manually configure the Sitecore Media Library
Manually configure the Sitecore Media Library
You manually configure the Sitecore Media Library so it can use a CDN:
-
On the Sitecore Content Delivery (CD) server, go to the Sitecore deployment folder.
-
In
App_Config\Include, create a folder named CDN. -
In the CDN folder, create a file and name it:
CDN.config -
Edit the
CDN.configfile and save the following information to the file:NoteInstead of http://example.com, use the URL of your CDN endpoint.
NoteYou can also find this example configuration file under the root Sitecore folder in,
App_Config\Include\Examples\CDN.config.example.For more information about configuration values, see the Sitecore Media Library CDN-related configuration reference.
-
Ensure that any URL that has been created using one of the options mentioned in Developer considerations for the Sitecore Media Library CDN support, in the Getting a CDN-enabled Media Item URL section, includes a CDN URL and revision number.