CDN, also known as Content Delivery Network is a technique to distribute the single server site load to a distributed system. Internet is a worldwide network of networks. Some latency is introduced in the system when the content is served from a single server to the users accessing a website from different parts of the world simultaneously. It also needs higher bandwidth to manage heavy server load at huge traffic outbursts. Data has to travel through many servers and public network channels in order to reach to its end point.
The entire process of delivering content over the Internet also increases server load, increases page load time and reduces site load speed. CDN or Content Delivery Network replicates cached copy of site’s content over a set of distributed servers spread across different parts of the world. When a user requests data from a site then the CDN algorithms tries to find a server in the closest geographical proximity of the user demanding the content.
Once the closest server is found in the geographical proximity, the content of the website is delivered from that server rather than fetching the content from the original server. CDN tries to reduce the total number of hops while routing the network to fetch the content from the server to the end user.
Sites using CDN services enjoy reduced latency time, distributed server bandwidth, reduced page load time as well as increased site load speed. All these factors result in loading the site faster so as to offer a better Internet experience to the end users. It also strengthens the SEO value of the site because site load speed is now considered as one of the important factors behind ranking a site on top of Google SERP.
CDN also helps you save bandwidth cost directly from your web host service providers because of the distributed server load. CDN acts as a global server load balancing technique. Max CDN, CloudFlare, Akamai CDN, CacheFly, SoftLayer and Amazon CloudFront are only some of the premier names in the industry of CDN providers.
It also saves us from the clutches of CPU Throttling. Varnish Cache Server is another caching technology used by many servers but may not be worth the efforts. A look at my WordPress site speed optimization portfolio will give you a fair understanding about the speed improvements that can be achieved without using CDN services.
WP Engine in itself is quite fast but coupling the services of WP Engine with MaxCDN is like getting nitro-boosters to transform your racing cars into super fast racing cars. Unluckily, MaxCDN is not included in WP Engine’s personal plan. The content on a website is divided into two parts – static content (part of a site that doesn’t changes frequently) and dynamic content (part of a site that keeps on changing frequently). On the first hand, importance of web host servers cannot be ignored as it prepares the foundation to host any website. Similarly, choosing the right WordPress plugins for right tasks is also important to keep your site in good shape. You may also like to read one of our case studies devoted to the Impact of WordPress Plugins on Site Load Speed.
Setting up MaxCDN on your WP Engine installation may be tricky, especially, if you are doing it for the first time, but once you go through the entire process in a step by step manner as explained by me, you will find it quite easy and simple. You only need to setup MaxCDN once and after that everything is done automatically. Once your site starts exploiting the power of CDN, your sites will load faster than ever before and you will experience the difference yourself.
Although, WP Engine in itself offers a complete WordPress hosting solution and returns great site speed results but heavy sites facing high traffic outbursts may need more power. Most of the big brands, big names and corporate sites experiencing heavy traffic employ CDN services from one or the other CDN service providers. If your site is popular, busy and needs more power to handle the web traffic outburst then activating a CDN service becomes a necessity. Although, I have done many site speed optimization case studies even without using CDN to improve their site load speed.
1Buy CDN from Max Content Delivery Network
The first and the foremost step is to buy a CDN service from Max to get started. We assume that you are on a WP Engine’s personal plan because otherwise, MaxCDN automatically powers your site running on professional WP Engine’s plan. MaxCDN offers a couple of content delivery plans to meet the CDN requirement for different types of sites.
It entirely depends on the traffic burst experienced by a particular website and you can choose the plan best suited to meet your site’s requirement. Every MaxCDN plan comes with different features so it is highly recommended to check the required features to power your site with MaxCDN. Once you purchase the required CDN plan for your site from MaxCDN, you can move ahead to the next step.
2Set a Pull Zone on MaxCDN
Pull zone is a method that lets MaxCDN to pull all the static content from your site to replicate on their distributed servers spread all across the world. In Pull Zone CDN method, you leave your site’s static content on MaxCDN servers after which you rewrite your urls to point to the MaxCDN services.
Whenever a specific file is demanded from the server for the first time, the CDN fetches the demanded content from the original server and then caches it on distributed servers for future references. The cache remains valid unless and until it expires. All the subsequent references to such content is fetched from the MaxCDN cached versions, thus reducing the latency time.
You can also go through a detailed procedure to create a pull zone at MaxCDN. It offers a complete GUI interface that is quite easy to catch up by anyone. You can also use Pull Zone Settings for making some advanced MaxCDN configuration.
3Set Your Custom Domain Settings Under MaxCDN
Setting up custom domain settings under MaxCDN is quite easy. Select a subdomain name for your site, preferably cdn so that the name in itself is self explanatory. I have personally used cdn and so my custom domain settings under MaxCDN looks like cdn.markdescande.com. Once you have setup your custom domain setting, you can move to the next step.
4Setup a CNAME record for your MaxCDN
CNAME record is also known as Canonical Name. It is a type of DNS record used to map an alias name to a canonical or a true domain name. CNAME record is saved as a pair of values in your domain DNS settings. CNAME record is used to run multiple services originating from the same IP address. On one hand, IP address is identified by your domain’s A record while on the other hand, a CNAME record identifies a service associated with a domain name rather than its physical IP address.
Using CNAME record makes the things easier as you only need to change the A record in case of change in your physical IP address rather than changing each and every CNAME record. Log in to your DNS service provider account and using advance DNS zone editor, set a CNAME record as Host : cdn, Points to : markdescande.markdescande.netdna-cdn.com (user your own server setting), TTL : 600 seconds.
After setting up everything as mentioned above, I got in touch with the customer support team of WP Engine. With their help, I used my custom CDN configuration on their setup. Looking at the GTmetrix speed report, I caught two important observations.
Use a Content Delivery Network (CDN) E (50) (on YSlow tab)
I tried to find a solution to improve these values.
5Activate CDN Linker (WordPress Plugin) to Link MaxCDN to Your Site
I added GitHub CDN Linker, implemented my site speed optimization tweaks and took fresh site speed test on GTmetrix. Value of both the factors improved as the test returned new values.
Use a Content Delivery Network (CDN) E (70) (on YSlow tab)
Using CDN Linker along with my WP Engine speed optimization tips returned the best of both the worlds.
We need to create appropriate link to connect MaxCDN to WordPress site. CDN Linker from GitHub is available for free download from this link. Scrolling down a little, you can spot a button with a label Download ZIP on the right hand side. Click on the link and save the downloaded zip file on your computer.
6Configure CDN Linker for MaxCDN
After activating CDN Linker, you will find a new option in your Dashboard settings menu – CDN Linker. Click on the CDN Linker to configure your CDN url and some other settings. You can copy the same configuration as I have setup on my WP Engine install by looking at the following screen, although do not forget to change my site url with your site url.
My MaxCDN url is cdn.markdescande.com, I have configured it accordingly. Clear the cache so that the new settings can come in force and the end users can experience fast site loading without any trouble.
MaxCDN is setup, configured and activated successfully on our site running on WP Engine. Now, let us have some site speed test reports to check the site speed performance enhancement after activating MaxCDN services on our site. GTmetrix, Pingdom Tools, Webpagetest and Webhostinghero are some of the free online site speed testing tools. These tools return almost true site speed values and also help us diagnose any speed related issues, if they exist. Let us have a look at our site speed reports one by one.
YSlow Grade : 93% (A)
Page load time : 0.92 s
Total page size : 300 KB
Total number of requests : 43
Requests : 47
Load time : 332 ms
Page size : 317.4 kB
Your website is faster than 99% of all tested websites.
Keep-alive Enabled : A
Compress Transfer : A
Compress Images : B
Progressive JPEGs : B
Cache static content : A
Effective use of CDN : Yes
Score : 90%
Load Time : 0.81 sec
First Byte : 0.09 sec
Number of Requests : 42
Page Size : 526.2 kb
CDN or Content Delivery Network is required by all those websites which are experiencing heavy web traffic. Sites experiencing light web traffic can manage even without CDN but for sites experiencing heavy traffic load, the page load time will increase which will also result in the reduction of site load speed. It is because of this reason that most of the popular websites are effectively using the power of Content Delivery Networks not only to increase the page load speed, but also to distribute the peak traffic load. CDN also ensures that in case of any major network failures, at least your site does not goes down entirely. Whether to activate CDN or not is a personal choice but do understand that once your site has enough number of visitors then it won’t remain a matter of choice but will become a necessity.
Now, my site is powered by MaxCDN. I can promise my site visitors a fast Internet experience. Even if you are not planning to buy MaxCDN at this point of time, you can read my other post about How to Speed Up WP Engine to improve your site’s load speed without CDN . Please do let us know for any troubles related to setting up CDN services on your site or any issues related to site load speed. You can also hire my Page Speed Optimization Services at oDesk for your commercial projects.
Post Editor : Ashutosh Kasera