The largest resources web servers have to deal with are images and videos. Oversized / slow loading images can seriously effect the page load speed of your site and in turn damage SEO rankings. Content Delivery Networks are designed to remove pressure from your webserver and help with this asset delivery.

How do CDNs work?

Simply put, a CDN takes a copy of a selection of fixed assets that exist on your site, and makes then available via dramatically faster servers that will be more geographically relevant to any enduser.

It’s able to know which assets to pull simply by what your users are requesting. When someone opens a page, it checks the CDN to see if the required images/files are available, if they aren’t the CDN will go the origin web server to pull (copy) these assets. From that point the CDN won’t need to talk to the origin server, it will just server up the copies it saved.

This means that all assets don’t need to be mass uploaded to the CDN to keep in sync. The CDN’s library of content will just build itself as users request pages and any future files will be automatically synced.

Our CND of choice is KeyCND, it’s UI is easy to navigate and their uptime and speed is great, it’s also very cost effective. These are two simplest options to get going:

1. Download the Cache Enabler plugin by KeyCDN

KeyCDN actually provide a plugin to link their service with your website. It’s plugin is a quick install but even though this is very straightforward, it’s just another dependancy that needs to be maintained on the site. So to remove the need for this, you can actually enable a number of CNDs through most caching plugins (which you should have on your site anyway).

2. Adding details to W3 Total Cache plugin

First go to Performance > General Settings, scroll down and select these options inside the CDN panel:

Once complete go to Performance > CDN and add your CDN url that can be obtained from within your KeyCDN account.

That’s it! ?

As well as installing a CND, it’s also important to start optimising your images. Here is our comparison to help you choose which optimisation tool to use.

Testing the CDN

Once activated, there are a couple of tricks to testing the CDN is actually working. Within the KeyCDN dashboard you should start to see delivery analytics:

Also another simple test is to open any image in a new tab:

Then check to see if the asset url is pointing to KeyCDN:

Last but not least, it’s definitely worth running your site through a page speed checking service and even checking against average page load times within your analytics to see the improvements.