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.
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 Site Name and Apply CDN
Now, go over to your application’s dashboard and navigate to the CloudflareCDN tab.
Now, add your site’s address to the Website URL field.
Once you’re done, click CREATE and you will be presented with the following screen.
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.
Now select enabled on the screen that pops up.
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.
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.
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.
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.
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.