How to Speed Up Website by Integrating CDN

Most of you may be heard about CDN, Content Delivery Network. CDN can increase the speed of the website as well as save bandwidth of the server by a notable amount. What a CDN network will do is put some files from your server to multiple servers. The files will be usually images, CSS, JS, etc. CDN networks have servers all around the world. So when you open a website that is integrated with CDN, main data like HTML codes will be served from you original server, while images and some other files will be served from CDN servers. Integrating CDN servers can really increase the performance of your site.


The most popular and best CDN networks are CloudFlare (my favorite) and MaxCDN. If you are beginner/intermediate and have a website that doesn’t have too much of traffic (<30k visitors per month) you can go for CloudFlare. Else go for MaxCDN or CloudFlare premium. MaxCDN doesn’t come with a free plan.

Advantages of using a CDN network in your site

  • Save bandwidth
  • Increase speed of the website
  • Security (prevent from SQL injection, dos attack etc)
  • Caching (browser cache)
  • Minify CSS, JS, HTML on the go
  • Host files in multiple servers
  • Reduce request to the server

That’s a pretty big list, right? You may be thinking, how much it will cost. Well, the above features are based on the free account in Cloudflare. And yes, CloudFlare is free (premium is also there, with lots of features).


How to Add/ Integrate CloudFlare CDN in your Website

CloudFlare is my favorite choice. It’s not only because it’s free, it comes with lots of features and is easy to integrate. Here the steps to integrate it with your website

  1. Create an account in CloudFlare
  2. After logging in click on “Add Site“, enter your site and click continue.
  3. CloudFlare finds some information about your site. After that click “continue setup“, then again “continue” and then select the free plan
  4. CloudFlare will now show you two new NameServers. Copy those that change your domain’s nameservers to the new one.
    cloudflare nameservers(You can change nameservers from where you bought the domain name. A sample screenshot from GoDaddy is below)
    nameservers cdn

Wait some time (max 24 hours) for the update to complete. After this, your site is successfully integrated with CDN server. CloudFlare comes with a lot of features like what I have listed above. Goto CloudFlare setting and play around with it. Good luck.