Private CDN for hosting data on SharePoint for improving performance

Developer Support

App Dev Manager Michael Mano shares some tips to improve SharePoint performance using a CDN.

When we target performance issues with SharePoint, the focus is generally on database related queries and all the requests that are being made to critical assets for the site like images, JavaScript files, CSS etc.  A quick response time for these resources are vital for your page to function optimally.

One way to significantly improve performance around this content is to use Private CDN for assets that change very infrequently. This can be done by hosting the assets in a CDN and then referencing them from the CDN endpoint.  Depending on the amount of data you host in the CDN, this approach can dramatically improve performance.

The implementation is relatively simple. All you have to do is create a Private CDN in O365, move the files, then reference it in your code– SharePoint takes care of the rest.

Here is a sample to configure a web part:

  1. Install the new (version 16.0.6008.1200) Tenant Administration PS from
  2. Using SharePoint Online Management Shell to connect to the tenant admin
  3. Set-SPOTenantCdnEnabled -CdnType Private -Enable $true
  4. Add-SPOTenantCdnOrigin -CdnType Private -OriginUrl site/subsite/picturelib
    1. (use relative path)
  5. Wait for up to 15 minutes for the configuration to propagate through the farm

You can configure any of your libraries to use the CDN as well with the steps above this will drastically improve your overall site performance.​

Here are some helpful links to get started with CDN.


CDN with SPO –

Management shell


Comments are closed. Login to edit/delete your existing comments

Feedback usabilla icon