Tutorial:

Introduction

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

What is a CDN?

If you are unfamiliar with a CDN, you can read more on the MaxCDN site.

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 - 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 Google recently claimed effects SEO rankings.

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

Setting it all up

Integrating your website and a CDN (like MaxCDN or Amazon CloudFront) with this plug-in is incredibly easy!

Here are some tutorials:

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 only

With CDN for Joomla! you can setup multiple cdn roots for different file types. This way you can - for instance - use a separate cdn url for your images and 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.

Settings

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:

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/.
CDN Domain The domain of your CDN Server.

Pro only
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. The CDN domain will be prepended with '//:'.
HTTP: The CDN domain will be prepended with 'http//:' (non-SSL).
HTTPS: The CDN domain will be prepended with 'http//:' (SSL).
File Types A comma separated list of file types that should be served from your CDN server
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.
Use 2nd CDN set
Use 3nd CDN set
Use 4nd CDN set
Use 5nd CDN set
Select to enable an extra Content Delivery Network setup. This way you can use different settings for different file types, like separate settings for images and js/css files.
FAQs:

Some scripts don't work anymore when served from the CDN

In those cases it is best to simply make CDN for Joomla! ignore those files.

For instance, facebook scripts often break when they are not run from the website itself. So if the script name is facebook.js, just place facebook.js in the Ignore Files field.

How do I set up CDN for Joomla! to work with MaxCDN

Please see the full tutorial for that here:
How to use MaxCDN in Joomla!

How do I set up CDN for Joomla! to work with Amazon CloudFront

Please see the full tutorial for that here:
How to use Amazon CloudFront in Joomla!

How can I keep using @font-face styles when using a CDN?

Try adding this to your .htaccess file:

<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

If that doesn't work, you can make CDN for Joomla! ignore your @fontface css files.

Place all your @font-face declarations in a separate css file called font.css.

Then just place font.css in the Ignore Files field.

Now the font.css file will be served from your own website instead of the CDN server.

Free vs Pro:

Set filetypes to handle::You can define what filetypes need to be served via your CDN url.
Ignore defined files::If some files cause problems if they get served via CDN (like some javascript files) you can make CDN for Joomla! ignore these

Handle HTTPS urls::Option to also convert SSL urls (https) and optionally keep the https in the cdn urls
Use up to 5 different CDN sets::You have the ability to set up 5 different CDN urls, each with their of settings, like file types, https handling, etc.

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

If you are unfamiliar with a CDN, you can read more on the MaxCDN site.

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 - 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 Google recently claimed effects SEO rankings.

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

Integrating your website and a CDN (like MaxCDN or Amazon CloudFront) with this plug-in is incredibly easy!

CDN Providers

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

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

25% discount on MaxCDN

MaxCDN Content Delivery Network