What is CDN?
CDN i.e. Content Delivery Network is nothing but a group of servers distributed geographically that work together in collaboration for giving quick and fast delivery of any internet content. The ultimate goal of CDN is to reduce the delay that occurs between submitting a request for a web page or web content and the web page to load completely on your device. What CDNs do is, they store a cached version of website content in multiple geographical locations that are also known as “Points of Presence”(PoPs). These PoPs have their own caching servers and are responsible for delivering the requested content in the user’s location. In this blog, we will see how to setup WordPress CDN. Our professional WordPress themes will surely never let you down.
Why CDN?
Without using a CDN, the content origin servers need to respond to every single request raised by an individual end-user. It causes significant traffic to the origin resulting in subsequent loading that will ultimately increase the chances for origin failure if the traffic spikes too high and persists for a longer time. In place of origin, a CDN responds to the end-user requests in close physical and network proximity to the end-user, offloads the traffic from original content servers and helps to improve the web experience by improving the speed of your site. Also, have a look at how to add image gallery in wordpress website.
Steps To Setup WP CDN:
1. Pull Zone Creation
We will see how to setup a WordPress CDN and for this, we have chosen the MAXcdn service. After you have created your CDN account, log in to this account and go to the control panel. You will see the navigation bar on top of the screen. Here, click on the “Zones” tab > “Pull Zones” and then click “Create Pull Zone” this will pull the data from the specified location after the first request for the file is raised. You have to fill the following fields:
2. Name - Name Of The Pull Zone
Origin Server URL - the root domain name that is to be distributed over the CDN. in case your site already has a redirect to the “www” domain, then make sure that you have added “www” before your site name and extension.
Label - description of the zone you are about to create
Upon clicking, the process of pull zone creation begins and it will take a few minutes to get completed.
Next, you need to create a CNAME record for “cdn.yourdomainname.extension” as “nameofthepullzone.yourdomainname.netdna-cdn.com”.
3. Create CNAME Record
CNAME tells the website visitors about the location of the resources when they try to access a site. To create a CNAME record, go to the domain’s Control Panel. Type “DNS ZONE” in the search box. Choose the “Simple DNS Zone Editor” option. Next, go to “Add a CNAME Record” and fill in these details:
Name - enter only the prefix of your custom domain. Control Panel will then autocomplete “yourdomainname.extension”.
CNAME - enter “nameofpullzone.yourdomainname.netdna-cdn.com”.
You can refer to the complete guide on creating CNAME DNS Record published by the CDN provider you have chosen. This will help you to avoid setup WordPress CDN errors.
4. Install and Set up the WP CDN Plugin
One of the most popular plugins is W3 Total Cache as it is compatible with most of the CDN providers and it is very easy to set up. However, before you install this plugin, you need to make sure that all the other caching plugins that you have activated on your site are uninstalled. This is necessary to do because it ensures that W3 Total Cache plugin runs on your site without any problems.
Go to your free WordPress themes admin panel, go to Plugins and then to Add New. In the search box, enter “W3 Total Cache”. Then click on “Install Now” to install this plugin on your WP site.
Once you are done with the plugin installation, go to “Performance” then go to “General Settings”. You will locate the CDN configuration box when you scroll down. Click on that box. Check the “Enable” box. Now select the NetDNA/MaxCDN option from the CDN Type dropdown menu and then click on the “Save all Settings” button.
The next step in the setup WordPress CDN is about the authorization key. You will have to give the “Authorization Key” and then enter the replacement in place of the default hostname. After clicking on the “Specify it here” link, the plugin will take you to your CDN provider page. After you have logged in to the MAXcdn account, go to Manage Account and select the API tab to get the API key. There is a field “Replace Site’s Hostname With”. In this field, you have to enter “cdn.yourdomainname.extension”. Once you have entered this, click on the “Save all Settings” option and later, test NetDNA. If you have properly followed the steps and have done things right, you will get the “Green Test Passed” report just next to the “Test NetDNA” button.
Checking the metrics on the performance panel before setting up this all helps you to compare the page loading speed values before and after the implementation of CDN.
As you have seen, to setup a WordPress CDN, it does not take much of your time. So to successfully set up a CDN, you will require to have at least some basic technical skills. To make it easy for you, you can refer to this step-by-step guide on setup a WordPress CDN. Referring to this can ensure that everything goes smoothly. Follow every step in this guide carefully and successfully setup a WordPress CDN.
Try WordPress Bundle from VWthemes for creating a feature-rich and stunning website for your business or services.