Kentico CDN Integration
Updated on December 4, 2021
This article shows how to complete a Kentico CDN integration with KeyCDN:
- Create a Pull Zone or Push Zone.
- Edit
web.config
within<system.webServer>
and add the following:
Adjust the CDN domain accordingly.<rewrite> <outboundRules> <rule name="Rewrite Assets to CDN by path" preCondition="IsHTML"> <match filterByTags="Img" pattern="/media/(.*)" /> <action type="Rewrite" value="https://cdn.yourwebsite.com/media/{R:1}"/> </rule> </outboundRules> </rewrite>
- Save all settings.
- Make sure the assets have been rewritten in the HTML of your website. We recommend to review the HTML and verify that the assets are loaded from the CDN.