Speeding Up Your Website With CDN’s

Ever since Google brought in their new Algorithms, which incorporate the speed of your site, it’s become more and more important to make your site as fast as possible

There are many options for you, such as minifying CSS / Javascript / HTML, optimizing images, and more – but we will deal with those separately, as they are entire topics on their own.

Ok, now back to the “speeding up” part.

A CDN (Content Distribution Network) is basically lots (generally hundreds) of
web servers scattered all around the world. When you serve up your images from the domain, it will decide where the visitor is located, and direct them to the closest server to them.

How, you’re probably thinking – “how can there be that much difference in speed if its closer to me? Surely the Internets very quick!“. Well, yes an no! The Internet is quick, but can you imagine the distances the data has to take to get to you if you were in the UK like myself, and the data was coming from Australia!

Even a small file like 20kb could take a while (and that’s only 1 of the possible images you may have on your site)

The CDN we use on this site is called MaxCDN.

With WordPress (the Blog software we use to run this site), there is a cool plugin called the “W3 Total Cache” , which makes it very easy to run your site using the CDN with the minimal of effort! They have a great article here about how to set their CDN system up with WordPress

For those of you NOT using WordPress or a system that has a “plugin” to make it easier, fear not – its simple to setup for your own site too! One of the sites I’ve setup using this CDN technology is http://www.cancunandrivieramaya.com/

Previously, this homepage used to take anything up to 8 seconds – but its down to a much more realistic 1 second now!

Admittedly, I have also done other speed tweaks on this site (minifying CSS, etc) … but the majority of this speed increase was just from the CDN system!

To set this kinda system up on your site , you would need to create a “Push Zone”. All this really does, is setup a new FTP account which you can login with. Once in, you upload your images / CSS / Javascript files, then give it a while to propagate the files around the world (this can take a while, so please be patient – I tend to upload them and leave it for a few hours, then come back to what I was doing)

Then, simply change the URL’s from your “real” domain, to the new CDN one! Simple as that, and it can make or break a site. I wish I’d known about this technology a long time ago, as it would have saved me a lot of hassle!

For arguments sake – I’ve done a quick test on GT Metrix, which is a cool tool that lets you test your site, and also get suggestions on speed.

Here is how our homepage did WITH the CDN fully operational.

..and here is how it did WITHOUT the CDN:

As you can see, there is 0.70 seconds difference, which on a page like this, is pretty darn amazing! Google generally recommends you try and keep your page loadtime down to 2 seconds or less, so 0.5 seconds is well within that margin!

Well, that’s it for this article… I hope its shed some light on the matter. Feel free to post comments if you have any questions!

Check out this company called Jump Online, they offer Glasgow Web Design services to local businesses. Thank you to them for helping us create this article!