Tutorial for CDN for Joomla!

There is a Free and a Pro version of CDN for Joomla!.
The parts in this tutorial that only concern the Pro version will be marked with: PRO


CDN for Joomla! is an extension for Joomla! that allows for easy integration with a Content Delivery Network (CDN).

CDN for Joomla! is made to work with any CDN system that supports Pull Zones. Below you can see some popular CDN providers that will work with CDN for Joomla!

What is a CDN?

A content delivery network (CDN) is a geographically distributed group of servers which provide fast delivery of Internet content, including HTML pages, javascript files, stylesheets, images, and videos.

Incorporating a CDN with your website gives you several benefits, including the following:

  • Faster Page Loads - Since most of your files will be served from a much closer location to your end-users, the speed in which your page loads will be greatly increased.
  • Reduced Server Load and Bandwidth - Since most of your files are no longer served by your own host, your server will be freed up to perform the basic tasks required of it.
  • Handle More Visitors - Because of the improvements just mentioned and other factors, your website will be able to handle the strain of a much larger user base that it could otherwise.
  • Higher SEO Rankings - Caused by the increase in performance to your site, something that affects Google SEO rankings.

Try out a CDN with your website to experience these benefits and more.

How to use it

Integrating your website and a CDN (like StackPath or Amazon CloudFront) with this plugin is incredibly easy!

In this tutorial you will learn how to make your Joomla setup use a Content Delivery Network (CDN).

This tutorial assumes you already have an account with your CDN of choice.

Create a CDN Pull Zone

First we will create a CDN Pull Zone.

Log into your account at your CDN of choice, and follow their respective instructions to create a Pull Zone.

Here are a couple of CDN-specific tutorials we put together:

The CDN service will now generate a domain for you to use. For example, that will look something like:


You can now manage and use your pull zone.

Set up CDN for Joomla!

Great, so your CDN Pull Zone is all set up.

Now we'll set up CDN for Joomla! so all the media urls in your Joomla site will be converted so that they point to your CDN server.

Step 1

Install CDN for Joomla! as explained in below.

Step 2

Go to the "CDN for Joomla!" system plugin:

In your Joomla administator go to Extensions >> Plugins. The search for System - Regular Labs CDN for Joomla! and click on it.

Step 3

Leave the Site Root option as it is.

Place your CDN URL (e.g. foo.bar.netdna-cdn.com) into CDN Domain, then click Save & Close.

CDN for Joomla!  - Settings


And that's all! You are now officially using your CDN service on your Joomla site.

Check implementation

To ensure you implemented your CDN correctly, you can view the source code of any page to confirm that the CDN domain is being used for static assets instead of your origin domain.

You can also use tools like pingdomgtmetrixwebpagetest that can give you more detailed reports on your CDN implementation status.

Note: The free version of the CDN For Joomla! plugin does NOT support HTTPS. If you need HTTPS support, you will need to buy the Pro version.

Pull Zones

CDN for Joomla! is made to work with any CDN system that supports Pull Zones.

A Pull Zone works in a way that you do not have to upload any media. The Pull Zone uploads the media to the CDN servers as soon as it is required.

A Pull Zone is what is needed to utilize the HTTP Caching type of CDN. The name Pull Zone came from the technique used, as the CDN service "pulls" the static assets from your website to cache it and serve it from the CDN network.

Pull Zones are meant to serve small-size (up to 10MB) static assets for websites. That includes stylesheets (.css), images, JavaScript files, text files, and small PDFs.

CDN for Joomla! does NOT upload files to your CDN server. As said, CDN for Joomla! only works with CDN systems that pull (upload) the media to the server on request.

CDN Providers

Here are some popular CDN providers that will work with CDN for Joomla!

Multiple CDN roots PRO

With the Pro version of CDN for Joomla! you can setup multiple cdn roots for different file types.

This way you can - for instance - use a CDN URL for your images, and a separate URL for js/css files.

Excluding parts of your website

You might have content or sections in your website in which you do not want URLs to be converted by CDN for Joomla!

You can simply achieve this by surrounding that content in {nocdn} and {/nocdn} tags.

URLs contained inside those tags will not be converted and will instead be served normally through your host.


CDN for Joomla! is packed with options, giving you control over how it works and behaves.

Here is the full list of the options you can find in the CDN for Joomla! system plugin settings, under the "Setup" tab:

Site Root The root of your website that you have connected to your CDN server.
You probably don't have to change this, but if you need you can specify a sub folder like /images/.
Enable on Protocol Select on which protocol to use this set.

Both: This will use the CDN in this set for all pages.
HTTP: The set will only be used on http (non-SSL) pages.
HTTPS: The set will only be used on https (SSL) pages.


CDN Domain The domain of your CDN Server.

PRO You can also give a comma separated list of different CDN domains. One of these will be appointed to each file in the set at random.
You can use the place holders {subdomain}, {domain} and {extension} to refer to the different parts of the domain name of your website.
CDN Protocol Set the protocol to use for the cdn domain.

Same: This will use the same protocol as your own domain / webpage.
HTTP: The CDN domain will be prepended with 'http//:' (non-SSL).
HTTPS: The CDN domain will be prepended with 'https//:' (SSL).
Use Relative Protocol Select to use the //: protocol when possible, instead of http//: or https//:.


File Types A comma separated list of file types that should be served from your CDN server

Default: css,js,bmp,gif,jpg,jpeg,ico,png,tif,tiff,svg,doc,docx,odt,pdf,rtf,txt
Ignore Files A comma separated list of (part of) path/file names to ignore (URLs will not be changed to CDN server).
Enable in Inline Scripts Select to convert the media file URLs found in inline javascripts. Switch this off if you find that this causes issue.
File Versioning Select to enable versioning of the file URLs. The last modified date of the file will be added to its URL. This will force the CDN to pull a new version of the file if it gets updated.

This option can have a negative effect on the loading time of your website.
Versioning File Types A comma separated list of file types on which to apply the versioning.

Additional CDN Sets PRO

Use 2nd CDN set
Use 3nd CDN set
Use 4nd CDN set
Use 5nd CDN set

Select to enable extra Content Delivery Network setups.

This way you can use different settings for different file types, like separate settings for images and js/css files.

Each set comes with the same settings seen above for the default first set.


You can either install CDN for Joomla! by using the core extension manager available in the Joomla! Administrator Control Panel, or by using the powerful Regular Labs Extension Manager.

Note: When updating CDN for Joomla!, you do not need to uninstall it first. The package will update all the files automatically.

Keep in mind that when you update to a major new version (or uninstall first), you might lose some configuration settings.

Regular Labs Extension Manager

It is very easy to install/update any Regular Labs Extension using the Regular Labs Extension Manager.

Please see the Tutorial for the Regular Labs Extension Manager for more detailed information...

Joomla! Extension Manager

To install via the Joomla! Extension Manager, just follow these steps:

  1. Log into your Joomla administrator;
  2. In the menu, choose: Extensions >> Extensions;
  3. Choose the tab: Install from Web (or enable it if you haven't done so yet);
  4. Select the search field and enter CDN for Joomla! and hit enter;
  5. Click on the CDN for Joomla! listing;
  6. Click on Install;
  7. Click on Install to confirm.
Joomla! Installer - Install from Web

Or if you need to install the Pro version or cannot install via the 'Install via Web' method for some reason:

  1. Download the extension install file (.zip);
  2. Log into your Joomla administrator;
  3. In the menu, choose: Extensions >> Extensions;
  4. Choose the tab: Upload Package File;
  5. Click on the Choose File button and select the extension zip;
  6. Click on Upload & Install.
Joomla! Installer - Upload Package File

If you have problems installing CDN for Joomla!, please try the manual installation process as described here: docs.joomla.org/Installing_an_extension