If you are a WordPress blogger or webmaster, you will know how important it is to improve the loading speed of your website for improving user engagements and getting better rankings on search engines. Apart from this, improving the loading speed of your WordPress website has lot many advantages and you can do it easily by integrating a content delivery network with your website. MaxCDN is one of the best content delivery network solutions available out there and by using their services, you can easily improve your website loading speed.
If you have signed up for MaxCDN but don’t know how to integrate it with WordPress, well then you are in the right page. Here, I have given a step by step tutorial to Setup MaxCDN content delivery network in WordPress with the help of W3 Total Cache WordPress Plugin.
Tutorial To Setup MaxCDN In WordPress Using W3 Total Cache:
I am writing this tutorial assuming that you have already signed up for MaxCDN and have a working WordPress blog.
1) To get started, go to your WordPress dashboard and install W3 Total Cache plugin by following this path: Plugins -> Add New -> Search for “W3 Total Cache” -> Install and Activate the Plugin.
2) Once the plugin is installed, enable CDN (content delivery network) settings in W3 Total Cache by following this path: Performance -> General Settings -> Scroll Down to CDN -> Tick the box next to “Enable In CDN” -> Select MaxCDN under “CDN Type” -> Click on “Save All Settings”.
3) Now, you will see the following message in W3 Total Cache: “A configuration issue prevents CDN from working: The “Authorization key” and “Replace default hostname with” field(s) cannot be empty.You need to select / create a pull zone. Specify it here.” Click on Specify it here to enter the CDN settings page.
4) In the CDN configuration page, click on “Authorize” under “Specify account credentials“. A new page will open up and you will be asked to log into your MaxCDN account. Upon logging in, you will get your “Authorization Key“. Note it down and close the page.
5) Next, paste the copied authorization key in W3 Total Cache CDN configuration page and click on “Validate“. If you have done everything as mentioned here, you will get “Key is Valid” message. Once you get that message, click on “Save All Settings“.
6) Now, go MaxCDN.com, log into your account and click on Zones. Next, click on “Create Pull Zone” under “Pull Zones“.
7) In the “Create Pull Zone” page, enter your Pull Zone name, Origin URL (your website URL with http://), Pull Zone label (for identifying this pull zone among others in your account) and click on “Create“.
8) Now, MaxCDN will create your Pull Zone and they might take up to 3 minutes to do so. Once the Pull Zone is created, you will be automatically redirected to that Pull Zone page in MaxCDN. Once you are in there, copy the CDN URL.
9) Next, you can directly paste this CDN URL under “Replace site’s hostname with” setting in W3 Total Cache after selecting the Pull Zone in the CDN configuration page or you can create a vanity URL like cdn.yourdomain.com using this CDN URL and use it for configuring MaxCDN with WordPress.
In this tutorial, I am going to explain about the vanity URL method since it helps in branding of your website. So, after copying the CDN url, log into the cPanel of your website and click on “Simple DNS Zone Editor” under “Domains“.
10) Now, create four CNAME records “cdn.yourdomain.com, cdn2.yourdomain.com, cd3.yourdomain.com, cd4.yourdomain.com” and point them to the MaxCDN CDN URL.
11) Next, go to your Pull Zone page in MaxCDN, click on “Settings” and add the four created CNAME records as “Custom Domains“.
12) Now, go to the CDN configuration page in W3 Total cache, select your Pull Zone name, then enter the created CNAME records under the “Replace site’s hostname with” setting and click on “Save All Settings“.
That’s it. Now you have successfully finished setting up MaxCDN content delivery network solutions in WordPress with the help of W3 Total Cache.
If you encounter any issues or if you face any challenges while following this tutorial, do let me know via comments.