Find answers, guides, and tutorials to supercharge your content delivery.

Drupal CDN Integration

Updated on October 4, 2018

Drupal is a free, open source CMS based on PHP. About 2.1% of the websites globally are powered by Drupal. Like other content management systems, it offers a wide range of modules that can be integrated into Drupal websites.

Slow Drupal website? KeyCDN can change that. Here's why: KeyCDN will cache the static files of a Drupal website all around the world. In addition to optimizing a Drupal website, it's essential to integrate a CDN for better performance. KeyCDN will cache the assets as long as specified in the HTTP headers defined by the origin server.

How does the Drupal CDN module work? The module will change the URL of static assets. The new URL will point to KeyCDN instead of the origin server. There is no redirection taking place, the URL will be rewritten to the KeyCDN domain. An example would be:

  • URL to the origin server: https://www.yourwebsite/drupalfolder/pic.jpg
  • New URL to KeyCDN:

Let's get started with the Drupal CDN Integration

This tutorial shows how to complete a Drupal CDN integration with KeyCDN.

  1. Create a Pull Zone before you start with the Drupal CDN integration. A Push Zone would work as well but it's not recommended here.

  2. Click on the menu item "Modules", then click "Install New Module".

  3. Go to Extend > Install new module > Install from a URL, enter the CDN Module URL: (check the official Drupal CDN module for the lastest version) and click "Install".

  4. Go to the Extend page and under Web Services select both "CDN" and "CDN UI" then click Install.

  5. Navigate to Configure > Web Services > CDN Integration. Set the CDN status to enabled and enter your CDN URL that you get from the KeyCDN dashboard (e.g. You can also use your Zone Alias (e.g. Save the changes.

    The setting "Far Future expiration" will define higher caching values for the assets (valid for KeyCDN, as well as the client's browser). Longer cached assets will result in less request to the CDN and the origin server, this can further improve the loading time. Alternatively, if you want to define higher caching values for assets, we recommend to do so in the KeyCDN dashboard for this specific Zone. Please note that content cached by KeyCDN can be purged anytime, but content cached by a browser cannot be purged.

  6. A red warning box appears. Click on "Aggregate and compress CSS files". Within the Bandwidth Optimization box, check Aggregate and compress CSS files and Aggregate JavaScript files, then save the configuration.

  7. We always recommend checking the changes in the HTML code. Make sure the URLs have been rewritten properly.

That's it. The Drupal CDN integration is completed. If there are any issues after the CDN integration, the KeyCDN support can be contacted anytime.

The benefits of using KeyCDN with Drupal

Once KeyCDN is integrated into a Drupal site, there are lots of advantages to benefit from:

  • Access to our complete network of POPs. Content is always served from the closest location to the end users.
  • Detailed statistics can be monitored in the KeyCDN dashboard.
  • KeyCDN supports HTTP/2 for even faster content delivery. There is no special configuration needed to take advantage of the new protocol.

KeyCDN also offers great tools and an up to date knowledge base. Here some useful pages:

Supercharge your content delivery 🚀

Try KeyCDN with a free 14 day trial, no credit card required.

Get started
KeyCDN uses cookies to make its website easier to use. Learn more