This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Add CDN to Drupal 7 and 8

Published on November 2, 2017 - Content Updated on

4 Min Read

There are a variety of measures that can improve the performance of your Drupal site. Though, the best one amongst all is to add a CDN to your site. Content Delivery Network (CDN) basically uses it’s own location to deliver site content to the user, negating the need for contacting the host location again and again. Essentially, this helps in speeding up the website.

Add CDN to Drupal 7 and 8

In this guide, I’ll be showing you how to add Cloudways CDN to your Drupal site. Cloudways partnered with Stackpath to bring you one of the best CDN solutions out there.

Launch Drupal on Your Cloudways Server

First and foremost, head on over to your Cloudways server and launch your desired version of Drupal.

Add Drupal Cloudways

Add Site Name and Apply CDN

Now, go over to your application’s dashboard and navigate to the CloudwaysCDN tab.

CDN tab Drupal

Now, add your site’s address to the Website URL field.

Website URL CDN Cloudways

Once you’re done, click CREATE and you will be presented with the following screen.

Cloudways CDN Details

Install and Enable Drupal CDN Module

Now download the Drupal CDN module. The links for both Drupal 7 and Drupal 8 are available here. Once installed, enable the module and move on to the next steps.

Get Ready for Core Web Vitals Update

Ebook to Speed Up Your Website Before You Start Losing Traffic.

Thank You

Your list is on it’s Way to Your Inbox.

Install CDN on Drupal 7

Navigate to settings for the CDN module by going on to admin->modules and clicking the Configure button for CDN.

CDN module configuration button

Now select enabled on the screen that pops up.

CDN Module settings

After this, navigate to the details tab at the top right. Here, you will be required to copy the CDN URL to the CDN Mapping field. Your CDN URL will be found in the CloudwaysCDN section in your application dashboard.


Paste the URL in the highlighted section.

CDN module URL field

Remember to add the http:// prefix with the URL. When done, save the configuration and remember to clear all the caches.

Install CDN on Drupal 8

Navigate to the CDN settings by navigating to admin->configuration->CDN Integration. Now, in the mapping tab, copy the CDN URL from your application’s dashboard (as shown in the last step) and paste it in the highlighted field.

CDN Module drupal 8 URL Field

Save the configuration and remember to clear all the caches.

Test CDN

To check if CDN has been successfully integrated, simply refresh your site and note the address that your browser fetches from.

Test CDN


That’s it! Adding a CDN to your Drupal site is a pretty straight-forward procedure when using Cloudways. Needless to say, it gives your Drupal website a massive speed boost. If you are looking to further speed up your Drupal site, see our blog post on, 10 Tips To Speed Up Your Drupal Website. Hope you found this guide useful. If you have any queries, feel free to leave a comment.


Share your opinion in the comment section. COMMENT NOW

Share This Article

Create interactive Drupal websites easily on the Cloud.

Host your website on optimized Drupal hosting servers.

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!