In last post, I told you about Content Delivery Networks and how to use them along with WordPress. Although, now I can suggest that one should certainly use Content Delivery Network as I’ve experienced the change in speed myself! Yesterday, I implemented CDN on this blog and the notice is considerable. The pages that used to take around 9 seconds to load are now loading in about 5 seconds. That’s a decent amount of difference! Now, I would tell you some of the questions that I had in my mind and I’m sure that you will be having them too -
Is it a costly affair?
Content delivery networks are considered to be costly, however surprisingly they are not. Most of the CDN providers run on Pay as you go pricing model and that lets you take control of things. In order to run the test, I signed up with MaxCDN, they have a fantastic offer – they are giving away 1 TB for $ 10. Of course, this is a trial run and a customer will be charged near about $100 for the next 1 Tb. Anyway, I’m not trying to promote any CDN provider, I went for MaxCDN for couple of reasons -
1. It was cheaper than other CDN providers.
2. It has been referred by Mashable, Joost de Valk, W3 Total Cache and I think that was more than enough for me.
3. 1 TB will run for months, there is no monthly payment, so I don’t have anything to lose.
Is it really hard to setup the CDN?
I wasn’t sure about this answer because there wasn’t anyone to tell me that how should I go about it. However, while playing with it – I realized that it is way to simple to setup the CDN. Of course, it would have been a nightmare without the W3 Total Cache. I just don’t have enough words for the praise of this plugin, still I would try to sum up in 2 words – Simply Marvelous!
So what’s the procedure?
I did the setup on MaxCDN and therefore, I would mention the steps for MaxCDN and W3 Total Cache settings only. If you plan to use any other CDN then you may have to refer to their support. I’m assuming that most of the CDN providers will have similar options only. Anyway, here’s how I completed the task -
1. Create a Pull Zone on CDN provider. In this (screenshot) most of the settings are generic, the only place where I got confused was Origin Server URL section. Anyway, I used the following settings and created the pull zone.
2. Asked WPWebhost to change the CName record as asked by MaxCDN. In many cases, Cname can be changed by you only, however WPWebhost doesn’t give the direct option to its users. However, support team was pretty quick in making the change. After the change, I waited for about 10-12 hrs for propagation. I tried to check http://cdn.blogdesignstudio.com and once I saw the whole website load without issues, I thought that it must be the right time to make changes in W3 Total Cache settings.
3. In the General Tab of W3 Total Cache, make sure that CDN should be enabled and the type should be selected as Origin Pull (mirror) [as shown in the screenshot]
4. In the CDN Settings tab of W3 Total Cache, you can configure various options related to what you want to use through CDN and what exactly you want to serve using your own web host. What I changed was just one value; ensure that you need to just put the value of Custom CDN Domain (of the first screenshot) in “Replace Default Hostname With”. Here’s the screenshot of what I have -
That’s it! I just saved the settings and everything was working neatly for me. If you get decent traffic and want to ensure that your blog loads faster than others, then you should surely use a CDN. In the end, I can say that I’m happy with what I’ve achieved – I’ll be posting more optimization techniques to ensure that we also contribute in making the web faster!