All business owners want their website to rise up the search engine rankings and gain as much traffic as possible. Nowadays, to rank highly on search engine results pages (SERPs), websites need to be as fast as possible — which explains why website loading speeds have become such a big deal.
For sites with global audiences, one such step in the right direction in the quest for an ever-faster website is making use of a Content Delivery Network (CDN).
In this article, we’ll go through the basics of what a CDN is before moving on to the subject of how to integrate it with WordPress and finishing with a few recommendations of the best CDNs available. Let’s get started.
Some CDN Basics
Now, when a user requests a webpage, each of these elements must be located on a server and assembled (all on the fly, and at lightning speed!). As such, most web pages don’t actually exist as preformed things — instead, they’re only created and served to a user when his or her browser makes a request to view a particular webpage.
The role of a CDN is to store as many of these aforementioned elements as possible on various different servers located across the world. This is to make them as geographically close to the people requesting them from the server as possible — the idea being that the shorter the distance the information has to travel, the quicker it will arrive.
What’s more, CDNs are also able to compress certain page elements or bundle them together into fewer packages, which results in less back-and-forth between browsers and servers, and again leads to quicker load times.
What Is a Content Delivery Network?
When using a CDN, when a visitor requests a webpage from your website, any static elements within the webpage are served to their browser from the server that’s closest to their actual location.
Note: For an additional, slightly broader explanation of what a CDN is, check out this handy infographic from KeyCDN.
The Benefits of Using a CDN
Incorporating a CDN is beneficial in more ways than one:
- It helps to load the static content of a website much faster. Servers located geographically closer to the user will serve up static pages, thereby cutting down on hops and round-trips-to-the-server times.
- The number of connections that a website can make at any one time is limited. When you have content stored on multiple servers, the load gets distributed, allowing more live connections.
- This arrangement can handle sudden bursts or spikes in traffic better. Bottlenecks at the original server will come down.
- Most service providers offer an additional layer of security to the servers, so any malware attacks are stopped before they reach the server. The security measures adopted by them will include IP cloaking, white and blacklisting, support for SSL, and multiple HTTP authentication methods. Even if any one server succumbs to an attack, others are available to ensure the uptime of the website. Any good hosting company is expected to have such security features, but it’s pretty much a part of the standard service for a CDN service provider.
- Speed translates to better user experience. Bounce rates are reduced.
- Most service providers also guarantee 100% availability, even in cases of power or hardware failures. So downtime on account of disruption in network is almost nil.
What to Look for in a CDN
CDNs generally offer a wide network of servers, easy integration with WordPress and free trial plans. And some even offer free services. While checking out service providers, always keep the needs of your website in mind.
- Bandwidth: The bandwidth and pricing for the bandwidth are really important aspects to check. You should be aware of your own bandwidth requirements and see if the service provider can match them at a reasonable cost. To estimate your bandwidth requirement, you can visit 5cents.cdn. Also, check whether bursting or sudden spikes in traffic are allowed, as well as the rates charged for such bursts. (You don’t want any unpleasant surprises.)
- Network Quality: The quality of the network can be tested by checking the latency (how long it takes to receive a reply) and bandwidth (the number of bytes received). Time-to-first-byte must be kept to a minimum, and the bandwidth must be consistent throughout the entire network, as speed will be only as good as the weakest link. This is especially important for a website streaming multimedia content.
- Availability: The network must always be available, and automatic redirection must be implemented if a server in the network goes down. Most CDN providers guarantee 100% availability. Also check network usage — an overcrowded network is bound to slow down or disrupt your traffic.
- Coverage: The network service provider must have a strong presence in the area where your audience is concentrated. While proximity of server or point of presence in the geographical area is important, traffic routing is what’s really critical to speed. This means that even if there’s a server closer to the location you need, it may not do you much good if the routing is done in a roundabout way. Generally, proximity is a reasonable indicator of the route that will be taken for transmission of data.
- Technology: When a user sends a request to a website, the DNS automatically directs the query to the nearest server, based on the location of the user and other details. The CDN must use the latest technology to transmit data reliably and speedily.
- Monitoring in Real Time: The service provider must monitor the network in real time, especially the last mile, and you shouldn’t learn from a user that your website is inaccessible. The provider can capture data from the user’s browser to check bandwidth and latency.
- Support: 24/7 support, 365 days a year is desirable, given that the network may operate across different timezones. Further, integrating a CDN in WordPress can get quite technical, and you may have to fall back on the support of the service provider.
- Cost: Cost is a major consideration when choosing any service. You can compare a number of service providers at cdncalc.com and find the best CDN. Or try cdnfinder.com, where you can use filters to find a CDN from among 35 service providers.
Types of Servers
The architecture of the CDNs will vary, and different CDNs have varying numbers of nodes and points of presence. They use a network of carriers, ISPs and network operators for hosting their servers and delivering content to an audience, and the servers and networks can be owned by the CDN or can be a mix of owned and leased.
CDNs can use different types of servers.
- Pull server: This server is ideal for WordPress users, and is great for delivering small files. Working with this kind of server requires that all your data is stored on your original server (meaning enhanced server space at your end). When a request is made near a CDN server, that server will pull the data from your original server and render it to the user. The first user doesn’t really experience any of the benefits of reduced load time, but the page gets cached in the CDN, and subsequent users will get the full benefits. The file from the server is cached till it expires. The pull method is easy, cheap and simple.
- Push Server: In this type of server, you upload your files to the service provider’s server. This is more suited to larger files, and will be more expensive, as you may have to purchase server space on the CDN.
- Peer-to-Peer Server: These servers rely on a huge number of computers connected across the internet — there’s no central server. It’s quite inexpensive to use these servers, but the security in this network isn’t much to speak of.
How to Integrate a CDN with WordPress
Integrating a CDN with WordPress is simplified a great deal by the use of plugins: Most service providers need you to activate plugins and choose the options specific to your website. Normally, you shouldn’t run into any problems, but if you do come up against a hitch, you may need some hand holding to complete the integration.
Just follow these ten simple steps:
- Pick a CDN Provider: Open an account with a CDN service provider. Each CDN is a bit different in the way it integrates with WordPress, but some steps in the setup process are common to all.
Back up: As always, when attempting major changes to your website, first back up all of your files and database (read more on backups).
Plugin download: You’ll likely be required to download, install and activate a plugin (such as W3 Total Cache (free), WP Super Cache (free) or WP Rocket (premium)), to assist in the integration process.
Plugin Settings: After the plugin has been activated, visit the settings page. This page is pretty self-explanatory, and you can adjust settings to your requirement.
W3 Total Cache: If the service provider doesn’t provide or recommend a particular plugin, the plugin that’s probably most commonly independently recommended is W3 Total Cache, which you can download and activate from the WordPress Plugins Repository. Once activated, visit the dashboard of your WordPress site and click on Settings under Performance, and check the box to Enable CDN. Select the CDN provider with whom you have opened an account.
6. CDN Settings: Now, find CDN under Performance and click on it. The settings in this page have different sections, and, in the General section, choose which folders are to be hosted on the CDN servers.
7. Configuration: Scroll down to the Configuration section, where you’ll be required to feed in the credentials given to you by the service provider (if you haven’t received these yet, contact their support). Once you’ve done this, you can Replace Host Site Name with the host name provided by your CDN service provider.
The ‘CDN URL’ you need to fill in can be found in the Pull Zone you create with your service provider. (More on Pull Zone in the next point.) Simply copy from there and paste it into this field.
The URL paths will look different on a page accessed over a CDN network, because access to these pages is now from a server in the CDN network, rather than your original server. These files normally take on the CDN’s URL automatically. Any page rendered to the user from your original server will have a URL as below:
When the file is uploaded to the CDN network server and served to the user from there, the URL will appear as below:
We can change this URL to
Note that mywebsite.com.cdn.com is changed to cdn.mywebite.com. Your DNS settings must be changed to reflect this. This may result in a few extra DNS queries, slowing down the response from the server, but we can make up for lost time as the response is fetched from the nearest CDN servers.
These changes are reversible, and, by undoing them, you can get the files to load from your original server again.
- Pull Zone: In most cases, before you can obtain the CDN URL to fill into W3 Total Cache Settings, a pull zone needs to be set up in the CDN server. Log in to your CDN account and, from the control panel, create a pull zone and name it, following the instructions set out by the service provider. If you enter a custom domain, you’ll need to create a CNAME record for it.
Once you’re done, you can test the setup and then save the settings in W3 Total Cache.
- Upload using FTP: If the CDN you picked doesn’t support W3 Total Cache or any other plugin, you’ll have to opt for a self-hosted or FTP-supported CDN. To upload files using FTP, keep details such as FTP host, user login credentials, security protocol and the FTP settings from the CDN service provider readily available.
Manual Upload: If FTP isn’t supported, you’ll have to manually upload the files. This a complicated way to do things, and isn’t advised for a newbie, so with many standard CDN providers around, I wouldn’t recommend a CDN that needs you to upload content manually.
A Quick Look at Some of the Most Popular CDN Providers
There are many quality CDN service providers catering to all kinds of websites — small and large — and I’ve highlighted the features of a few of the more popular ones that are suited to small, medium and fairly large WordPress websites. I haven’t included CDNs such as Akamai that cater to huge, enterprise-level websites.
MaxCDN counts many well-known names, such as WP Engine among the 16,000 websites that use its services. Content is placed in 19 global PoPs, and MaxCDN maintains peering agreements with Vodafone, AT&T, Verizon and Rogers for faster delivery of content to mobile phones.
Integration with WordPress is through using W3 Total Cache, and a mid-tier caching layer protects your origin server from request overload. Enhanced security is ensured with two-factor authentication and IP whitelisting; purging & provisioning, SSL activation and analytic reporting all happen in real time. You can also control the way content is delivered to users from the Edge Servers by changing the rules for the Edge Servers.
You can build a pay-per-gigabyte custom package or opt for the standard packages at $9 or $299 per month. The two standard packages come with a 30-day money-back guarantee.
CloudFlare uses the most recent changes in hardware, web server technology and network routing to build a technologically advanced CDN that can load pages twice as fast and save up to 60% in bandwidth. You can verify this claim from the analytic report for your website.
CloudFlare combines with the CloudFlare WordPress Plugin to make CDN integration with WordPress easy. Not much configuration is required (most websites will work well with the default settings), and the CDN builds an Always Online version of your site that will serve up the important pages of your website when your original server is down. CloudFlare also safeguards your site from malicious attacks.
A basic free plan is offered for every website. There’s no charge for bandwidth usage — instead, a flat rate is collected based on the functions bundled in the plan. This means that if your website suddenly becomes popular, you won’t have to shell out any extra for sudden bursts in traffic.
Note: For an extensive look at the differences between MaxCDN and CloudFlare, check out our in-depth comparison.
KeyCDN is designed for speed and reliability. It offers the latest encryption features, two-factor authentication and a pay-as-you-go feature. There’s no fixed fee, and you pay only for the data you transfer.
It comes with a powerful dashboard that can manage the CDN and provide real-time analytics. The Anycast technology used by the network helps to route traffic optimally, to scale up speed and reduce latency.
On the features list, KeyCDN compares well with the more popular MaxCDN (while being a little cheaper), and there’s a 30-day free trial if you want to check out the features without committing.
CDN77 claims it has one of the most dense networks of servers, and can accelerate your website up to 56%. This service provider is so confident of its services that the homepage allows you to compare your present CDN with its own. It caters to the needs of about 12,000 websites, and has a web-based control panel that allows you to monitor things from wherever you are.
Rich digital media in almost all formats can be transmitted without any disruption, and the high-quality gaming and capability to handle high traffic density will be a delight to gamers and gaming websites. CDN77 uses a special algorithm from Google for compression, improving usage of storage space and speed of loading. No DNS changes or any manual configuration are necessary, as everything is taken care of automatically. The folks here can also help you build your own Private CDN.
CDN77 offers a 14-day free trial — after that you have to move to pay-per-byte plans. The plans vary for different regions and different data usage bands — for high bandwidth usage above 500TB, you can migrate to their High Volume plans.
SoftLayer, an IBM company, partners with Edgecast to establish 24 nodes in diverse geographical locations, offering fast and reliable CDN services. (This is in addition to SoftLayer’s own network of data centers and Points of Presence.)
Everything on this network is totally automated: Server storage, firewalls, load balancing — all are controlled by management systems with their own APIs. These APIs are shared with the customers so they can tailor the CDN to suit their own specific needs.
SoftLayer isn’t just a CDN — it’s so much more. If offers a whole basket of services, including storage, backup, networking, security, management and support, and can completely service big data, government, gaming, digital marketing, private clouds and reseller hosting service websites. It adopts a pay-as-you-go plan with a rate of $0.12/GB.
Photon from Jetpack isn’t a fully fledged CDN exactly. Instead, it caches WordPress images and serves them through the WordPress.com grid. Self-hosted websites can make use of this service via the Jetpack plugin, and the images they use in their posts and pages will automatically be sent to the WordPress.com cloud when the plugin is activated.
To start using this service, simply install Jetpack, and activate the Photon module within the Jetpack page of your dashboard. You can apply it to older posts too, and can turn the feature on and off at will. The flipside in Photon is that it only caches GIF, PNG and JPG files, but this shouldn’t really be seen as a drawback, as most images use these formats anyway. The files are cached indefinitely, so if you want to refresh an image you’ll have to give it a new name. If the image takes longer than 10s to upload to Photon, it will be timed out.
This service uses a network of CDNs to offer the best performance and fullest uptime. In places where the network coverage is inadequate, custom servers have been installed, and jsDelivr has 98 PoPs spread across the globe. The smart load balancing software combines with multiple uptime monitoring checks to detect any downtime and redirect traffic.
For infrastructure, jsDelivr collaborates with multiple service providers, and, because it isn’t dependent on any one vendor, it can negotiate the best possible deals for users. Also, if you want a customized network, jsDelivr will build it for you.
Which CDN Should You Choose?
It’s worth pointing out that many small websites with limited traffic may not actually need a CDN at all — and that many small-to-medium sites still using a basic shared hosting plan will, in fact, almost certainly make a far greater impact to the overall speed of their website by simply upgrading to a Managed WordPress Hosting Plan, many of which (such as WP Engine and Flywheel — to name two of the very best) will actually include a top-notch CDN for free anyway!
For appropriately hosted sites that have already done the basics of web speed optimization (such as optimizing images, implementing a caching system, minimizing unnecessary server requests, and so on), though, the addition of a CDN will almost certainly give a much-welcome page-speed boost!
And, lastly, for those that have huge levels of global traffic and the technical chops to match, take a look at RackSpace and Amazon’s CloudFront (which can both handle absolutely huge amounts of traffic).
Using a CDN? Which one and why?