The Internet and any client has a need for speed; that much everyone already knows. But why is this so important for your WordPress site, and why should you use a CDN for WordPress to help with your site’s loading times?
You’ve probably seen the 3 second loading time chart many times. It, and countless charts just like it, are everywhere.
There’s a reason for that though – page loading time can massively affect conversions; it’s as simple as that. And what are most WordPress sites aimed at, ultimately? I know that my sites are all focused on somehow making money. Whether they’re affiliate sites or service-based websites, they’re all aimed at converting!
If loading times affect conversions, then fixing issues with speed is a good thing to do.
Here are four reasons that you may want to use a CDN for WordPress sites that you build or manage.
1. Your Site Will Load Faster with a CDN
This is one of the strongest selling points of setting up a CDN for WordPress.
One of the biggest speed killers for your website is distance. Specifically, the distance between your hosting server and the visitor’s browser. Whilst the size of your page makes a real difference, the distance the content has to travel can definitely be the largest bottleneck in website loading speeds.
Ideally, your visitor needs to be as physically close to the hosting server as possible.
Unfortunately, setting up a hosting server at a location which is physically close to any one particular visitor is all but impossible — unless you are setting up a CDN, that is.
The very idea of a Content Delivery Network (CDN) is exactly that. A CDN’s primary purpose is to set up as many servers as possible in different geographical locations, such that anybody who hits the service is as physically close as possible to one of the locations.
Have a look at the following image from CloudFlare which explains the concept perfectly, this shows the Cloudflare network powered by 165 data centers around the world:-
You can see that there are many CDN server points. In this manner, all visitors, in any location in the world, are always served content from a location which is (relatively speaking) near to them.
Hosting static content on a CDN network is the closest you can get to creating a global hosting setup for your website.
2. Your Website Will be Safer with a CDN
The next reason why a CDN is essential for your website is security.
Did you know that more than 51% of the web’s traffic actually comes from bots rather than humans?
The worst thing about it is that above 29% of web traffic comes from malicious bots.
That means your website is constantly under a deluge of bad bot traffic. If you’ve ever taken a look at analytics data, or used a security plugin like WordFence, you’re already aware of this fact.
These bots are constantly probing your site for vulnerabilities. If you slip slightly in your security efforts, if you have not chosen a good WordPress host, or if you miss a WordPress security update or a plugin update, rest assured your site will soon be suffering the consequences.
Most CDNs are able to identify and block bad bots rapidly, making your site safer when plugged into a CDN. The collective knowledge gained by the network can be used to prevent attacks on your own sites.
3. Your Site is Protected Against Traffic Based Attacks with a CDN
I’m sure you’ve been stuck in traffic at least a few times in your life. I know I have. Getting stuck in traffic is a waste of productive time and money.
The same concept applies to your website.
However, it’s even worse when somebody purposely sends an overwhelming amount of traffic to your website.
In a Distributed Denial of Service (DDoS) attack, an army of compromised web servers or computers (or even IoT devices) are recruited to send so much traffic to your website, that your legitimate users unable to access it.
If your website is the lifeline of your business, a DDoS attack can literally bring your business to a standstill. Regardless of whether you’re on a shared hosting server or a dedicated server, your website won’t be able to keep up with the flood of traffic.
The same concept used by a CDN to make your website fast, can also work in your favour by absorbing malicious traffic over a global network of servers fronting your website.
Most CDN implementations use the concept of reverse proxy to serve your website. The reverse proxy will be the CDN server network.
This means that your website’s visitors will hit the CDN server closest to them before they hit your site’s actual server.
In this manner, any malicious traffic is intercepted before it actually gets to your server. CDNs have intelligent algorithms which are able to identify malicious DDoS traffic and kill it.
Incapsula, MaxCDN, KeyCDN, CloudFlare and most of the top players all have support for mitigating traffic-based attacks.
4. Faster Web Design and Development
When you’re creating a WordPress site which is meant to be fully optimised for performance, you’re going to have to perform a number of additional implementation steps.
You’ll be looking for an image optimisation plugin, a content minification and combination plugin, a static and dynamic content caching plugin, and other tools to fully optimise the WordPress website. While it may be possible that one or two plugins are able to actually serve most of your optimisation needs, you’ll still need to perform additional testing to ensure the plugins are able to operate correctly.
Personally, I’ve found that optimising with various plugins is a nightmare of epic proportions.
CDNs are actually able to perform all of the above mentioned optimisations in one fell swoop. Image optimisation, dynamic file compression, static and dynamic content caching are all built-in into the CDN.
Coupled with that, there are other optimisations such as Custom Content caching rules to fix any problems with specific plugins on your site.
Most of these performance optimisations are going to be hard to achieve with your typical WordPress plugin.
Such stuff as session reuse optimisation (particularly for HTTPS websites), TCP Connection pre-pooling and rapid purging all improve the optimisation.
Other improvements such as improving the SSL/TLS handshake process would not be something which the typical developer would be capable of optimising by themselves. Having this completely handled by the CDN gives a significant boost, particularly to HTTPS websites, which unfortunately take a hit in performance when enabling HTTPS.
All of these above optimisations decrease the design and development time with the website whilst pushing the performance envelope as far as it can get.
A CDN catering for all of the above will drastically reduce the time spent on optimisation.
Conclusion
Speed is typically the most obvious benefit of using a CDN that people will mention over and over again.
While the website loading speed is a critical component, and an essential justification for setting up a CDN, this should not be the only selling point.
The other points mentioned, particularly performance, security, protection and better optimisation are just as important as website loading speed.
At the moment, we use CloudFlare CDN for our web sites. We customise the settings for our clients to give their web sites the best possible results in terms on SEO and Site Speed.