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.

📣 Try the fastest hosting platform with pay-as-you-go pricing & 24/7 expert support! MIGRATE NOW →

How to Add CDN to Drupal 7 and 8

Updated on July 8, 2021

4 Min Read

There are a variety of measures that can improve the performance of your Drupal site. One of the best is adding a Drupal CDN to your site. 

Drupal is a free and open-source web content administration framework built upon PHP’s PHP Data Objects (PDO) database API.

There are a variety of measures that can improve the performance of your Drupal site. Though, the best one of 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 many cases, it’s extremely beneficial to integrate your Drupal website with a CDN. Drupal CDNs are distributed globally with a network of proxy servers. A fundamental CDN integration will offload static resources such as pictures, videos, and, in some cases, CSS and JS to the CDN, which caches it to multiple servers located worldwide. 

The CDN then delivers that content to the user from the server closest to them, and in doing so, reduces the distance between the user and the web content. This drastically lowers response times.

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 Drupal 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 CloudflareCDN 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.

CDN URL

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

Conclusion

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

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!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now