Drupal CDN Integration
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:
- 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.
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.
Click on the menu item "Modules", then click "Install New Module".
Go to Extend > Install new module > Install from a URL, enter the CDN Module URL:
http://ftp.drupal.org/files/projects/cdn-8.x-3.2.zip(check the official Drupal CDN module for the lastest version) and click "Install".
Go to the Extend page and under Web Services select both "CDN" and "CDN UI" then click Install.
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.
https://example-hexid.kxcdn.com). You can also use your Zone Alias (e.g.
http://cdn.yoursite.com). 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.
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:
- The Website Speed Test from KeyCDN lets you analyze the loading time of a website.
- When it comes to HTTP headers, the KeyCDN HTTP Header Checker is the perfect tool.
- Custom SSL is free for everyone, just upload your certificate.
- The SSL Certificate Checker lets you easily verify certificates.