A Content Delivery Network is a network of servers around the world that can be used to offer resources to users without having to pull them from the source server which is limited to one location. This makes the use of a CDN especially usefull for websites that operate globally, like the Joomlaseo.com website, which attracts users from all continents:
Especially if you suspect your site is often accessed from developing countries, a CDN becomes even more efficient, as the infrastructure is often less advanced. Even if you think your website is very fast, it may not be the case in say, Gambia.
But even sites that only target a specific country will always have users that travel and want to access the site from abroad. Also, countries like the USA, Russia, China, etc. are too large to be served efficiently from just one location. So, enough reasons to implement a CDN, especially as implementing one does not have to be very difficult or expensive.
A CDN fetches the files of your website, and distributes them to datacenters all over the world. Based on how you set it up, the static files will be served from the CDN, which will usually be:
Anything non-static, like the ever-changing content of your articles, i.e. the HTML files, should not be fetched from the CDN. Often, 75% of the size of your website will now be pulled from the nearest server of your CDN provider.
When you implement a CDN on your website, you basically configure the static content to be pulled from the CDN. Let's look at an example for an image. Without a CDN the image would be fetched as follows:
<img src="/images/seo-joomla.jpg." />
After the CDN is activated this will be:
<img src="/https://cdn-url-xxxxx.netdna-cdn.com/images/seo-joomla.jpg" />
You clearly see the difference: instead of the relative URL that would pull the image from the website's domain, it is pre-pended with the domain of the Content Delivery Network. For your CSS and Javasscript files it does not matter too much that these URLs are a bit long and funny, but with a good CDN you can make the URL's prettier. You are then requested to configure a CNAME record on your domain (with your own webhost), say cdn.joomlaseo.com, and your files then seem hosted on a subdomain of your own site instead of directly on the CDN. If ths sounds complicated, just forget it, usually you should be fine without any issues. However, if you want to configure your CDN with a custom domain, I have a very in-depth blogpost about this.
If you want to use a CDN with Joomla, usually you will have to go through 2 major steps:
As an alternative, you can choose a webhost that offers CDN functionality through their Cpanel. Siteground.com is an example, where you can switch on the CDN (by Cloudflare) without any configuration in Joomla.
When selecting a CDN, check their reputation in the forums, their price, and any possible conflicts they could have with Joomla. Also check any requirements they might have. An example is CloudFlare, which forces you to have a website accessible through www-. Much used services are:
For most providers, some basic configuration is usually needed on the CDN side. You will usually have to enter your site's URL first, plus some additional settings. Some of these settings will then have to be entered in the settings of the plugin that you choose in Joomla.
An exception is the free Cloudflare integration for Siteground customers. In this case, you can activate the CDN from within the Siteground Cpanel settings. Click the Cloudflare button, enter you email for a free Cloudflare account, and your CDN is immediately ready, without any further configuration in Joomla (see their tutorial).
Currently a number of CDN Extensions are listed in the JED. Usually you need one of these to set up the integration:
An extension that might not pop-up immediately when you look for plugins to support CDN's is JCH-Optimize. Between all the other tools to enhance website speed, it also offers CDN functionality in one of the advanced tabs, though currently limited to Amazon Cloudfront and MaxCDN. Set-up for all these plugins is usually pretty easy to do, depending on which one you choose.
Now that we covered the basics of CDN's, let me show you quickly how to actually implement the different providers in Joomla. The most used ones are MaxCDN, Cloudflare and Amazon Cloudfront. I will discuss the basics of these 3:
Joomlaseo.com is fully built and written by Simon Kloostra, SEO Specialist and Webdesigner from the Netherlands. I have also published the Joomla 3 SEO & Performance SEO book. Next to that I also sometimes blog for companies like OStraining, TemplateMonster, SEMrush and others. On the monthly Joomla Community Magazine I have also published a few articles.