Disclaimer: I work for CleverScale: the company that developed the CDN federation tool hereby mentioned. This is the first of a series of “How-Tos” on how to use a CDN to accelerate the most diffused CMSes and Blog packages with the least impact possible.
Joomla! is one of the most diffused CMS, it accounts for more that 2,5% of the sites on the Internet.
In this short tutorial we configure a third-party plugin called “CDN for Joomla!” to use CleverScale CDN federation tool; CDN for Joomla! is the effort of Peter van Westen of NoNumber, a prolific Dutch programmer author of an interesting portfolio of Joomla! extensions.
CleverScale is a unique service of its kind because it federates the quality and global reach of professional CDN providers under a “pay for what you use” model. For many reasons, you will discover, CleverScale is the perfect choice for low-to-mid traffic sites in need for better global user experience.
CDN recipe: ingredients
- A working Joomla! 1.5 or 1.7 (1.6 worked for us but it’s not actively supported)
- Your Joomla site is on a virtual host or an aliased root (i.e. no slashes in the public address)
- Access to Joomla! administration pages (i.e. the “Backend”)
- A subscription to CleverScale CDN
- 30 minutes of your time and attention (including reading this guide).
Step one: create a CleverScale distribution
A distribution is the activation of content delivery services for a given domain: you are requested to provide the name of the website to accelerate (known as: origin), CleverScale does the rest by redirecting users to fetch the content (known as: assets) of your website that has been transparently cached on the CDN networks.
CleverScale supports “Pull” mode. To learn how “Pull” and CDNs work, in general, please refer to: http://en.wikipedia.org/wiki/Content_delivery_networkWe assume you already signed up to any of CleverScale services thus, you received a confirmation email where you can click the “Confirm my account” link and start configuring your first distribution.
The configuration Wizard asks you, first, to give a name to your distribution; this is just a label for your convenience and it doesn’t influence the setup.

The Wizard continues asking you the public URL of the origin website; enter the domain name with no trailing slash or the Wizard will politely complain. In our example we have a Joomla website that is called jotest.kaukana.be that needs some nitro.
Your assets (i.e. the content you want to accelerate) might be located somewhere else (under another domain/subdomain, on an S3 bucket, etc.) or you might want to organize your content manually. The Wizard allows you to cache these “off-domain” assets anyway by asking you an alternative domain name.
In our case “CDN for Joomla!” will do the job for us so, just answer “Yes”.

Now the tricky part; creating a distribution is quite a process because it involves global DNS redirection and the creation of accounts on every CDN CleverScale federates. Did I lose you here? Never mind, it’s just that the Wizard now asks you check the effective availability of the content by fetching a sample, in the case of Joomla! there is always an index.php page to fetch.
Once the test is passed, the Wizard asks if you want to “beautify” the links to your assets.
Why would you want to do that?
Because if you don’t, the effective address of your “Assets” will appear in its native form (something.cleverscale.net) and your HTML might look like this (red text):
<link rel="stylesheet" href="http://2das1npnmejhxi878wu.cleverscale.net/templates/system/css/system.css"
type="text/css" />
Instead of, for example:
<link rel="stylesheet" href="http://cdn.jotest.kaukana.be/templates/beez_20/css/position.css"
type="text/css" media="screen,projection" />
There is a definitive advantage to keep assets’ URLs in “something.cleverscale.net” form: you are immediately ready to go and you won’t need to change your DNS records; but let’s proceed with order.
- You will answer “Yes” if you want to beautify the URLs under your own domain
- You will answer “No” if you can live with a “cleverscale.net” asset’s domain.

If your answer is “Yes”, then you have to provide a convenient subdomain. Keep in mind that such a subdomain will become a CNAME record in your DNS, it cannot be an existing record or alias.

If your answer is “No”, all you need is to qualify a subdomain of your distribution as for the following picture (in this case you can choose any name you want, unless you created another distribution with the same name).

The last step is the same for both cases: you are done and ready to go!
![]()
It will take an interval between 15 and 30 minutes before you receive an email from CleverScale with the confirmation that the distribution has been activated on all distribution networks and that the DNS redirection has been propagated worldwide.
Once this happens, you will also see on the “Distribution Status” (click on “Detail” on the “Distribution” frame to access the status screen) that all lights are green.

Step two (optional): configure your DNS
If you chose to “beautify” your URLs pointing to cache assets, you need to add to your DNS a CNAME Record; you won’t have to do this if you use the courtesy URL that CleverScale proposed in the Distribution Wizard.
You must refer to your ISP or domain registrar’s DNS procedures to learn how to modify your records; no provider uses the same mechanism or policy.
To give you an idea, we host our DNS at GoDaddy, in that case the steps would be:
- Login on www.godaddy.com with an administrative account.
- Choose “Domain Management” from the tab “Domains”
- Use the DNS manager to add a Cname (see picture)
- Save the new configuration

It might take hours (typically between 1 and 24) before the DNS changes are propagated everywhere, check with a DNS utility if you resolve the right address:
In our example, using a client based on Linux, OSX, BSD, open a shell and type:
dig cdn.jotest.kaukana.be
For Windows-based clients, open a DOS window and type:
nslookup cd.jotest.kaukana.be
The output of both commands should contain a non-empty answer section, similar to this:
;; ANSWER SECTION: cdn.jotest.kaukana.be. 1800 IN CNAME 2das1npnmejhxi878wu.cleverscale.net.
Step three: install and configure “CDN for Joomla!”
Let’s retrieve and install the plugin. Joomla! provides a very easy way to do that by using the built-in Web-based administrative interface: the so-called “Backend”.
Access the Backend and select on the “Extension” Tab the option “Extension Manager”.
In our case we are going to directly download the plugin from the author’s website, enter the following address in the field labeled “Install from URL”:
http://nonumber-cdnforjoomla.googlecode.com/files/CDNforJoomla-v1.7.0.zip
By pressing the “Install” button, Joomla! will download the plugin and install it.
Caveat emptor: you need a working Joomla! FTP server to perform this operation.
There are alternative methods to perform the installation like uploading the file from your computer or just discovering it on the host’s file-system, your mileage may vary.

As soon as this step is completed, go to the administrative view of Plugins by selecting the option “Plugin management” in the tab “Extensions”. If you have lot of extensions (as it is the case of a standard Joomla! Instance), use the “Filter” option or just jump to the successive page of the Plugins’ list to find the “CDN for Joomla!” plugin.
Once you find it: click on it to enter the Plugin’s “Settings” page.

At this point there is not much left to do.
Activate the plugin in the left frame (select “Enabled”).

In the right frame, depending if you asked for URL beautification or not, you will have to enter either the CNAME you created in the Distribution Wizard or the domain @cleverscale.net.
We found that the default settings of “CDN for Joomla!” work out of the box


Save the settings and exit. You are ready to go.
Takeaway: is CDN acceleration worth the price?
We heard often that CDN services are worth their (high) price only if a website consumes hundreds of GBs of bandwidth per day. That might have been true in 2007, in 2012 the situation has changed: actors like CleverScale, CloudFront, MaxCDN and CloudFlare provide “pay as you go” content distribution services for every pocket.
Although the quality of these services is not on the same league (CleverScale focuses on delivering the fastest low-cost acceleration possible), the return in terms of SEO visibility and user satisfaction exceeds the price paid.
To give you an idea of that: a typical Blog serving 100K unique visitors per month, saw the bounce rate decrease by 15 points after the CDN option was activated. The bill? 9US$ per month, and, yes, it’s growing!
