Speed Up & Secure Your WordPress Blog With CloudFlare Free CDN

[This post is part of the WordPress Guide for Beginners – Step by Step Tutorials]

Site speed is one of the major factors that is considered by search engines for better ranking. Moreover speedy site provide a good user experience.

If you have a slow site no one have enough time to wait and read your post. Searcher will click the back button and visit to other listings.

So Speed does matter! Cause all of your blog visitors don’t have first internet connection, even some people are using shared Wi-Fi connection.

To stick your readers you have to provide a good speed. One of the easiest and effective way to speed up your site is using WordPress CDN service.

Speed Up Your Site By Using CDN

I know you heard a lot about CDN! But have you ever tried it? If not, then now time to use CDN network. It will take only 6-10 minutes to set up CDN.

Before go to the set up guidelines, Here are important things about CDN.

What is CDN?

content delivery network (CDN) is a large distributed system of servers deployed in multiple data centers in the Internet.

How it works?

We usually use shared hosting and all our files are hosted in a data center. I am using Hostgator which data center located in USA. When a user from Bangladesh open RoadToBLogging.com, his request goes to data center at USA and then his browser open the site. Obviously it will take some time.

Now a CDN have data center in many location. When a user open your site, your files will be served from nearest data center. And it will take less time.

There are many CDN networks like Cloudflare ,Amazon cloudfront, MaxCDN which are providing CDN services to their customer. If you are going for a free CDN service then CloudFlare is the best option.

Update: If you are going to change your hosting provider, then firstly change your provider and go for CDN service. The reason is on Barry Wells’s comment below.

Here is simple step by step guide about Cloudflare CDN setting.

How to Set Up Cloudflare with WordPress

Many web hosting services give a built-in option in cPanel to enable CDN. It is very easy to do. But the PROBLEM is it may down your site for several days. So it is better to try it from CludFlare site. To do that follow the simple steps.

1. Visit CloudFlare and sign up for a free account.

2. Now enter your site URL and click ‘Add website’ button.

3. Configure DNS – Now your DNS record will be automatically listed by CloudFlare. Your task is to check that all the records are available in list. To check this login to your CPanel and find it on Advanced DNS Zone Editor.

Now you can choose which domain you want to active in CloudFlare by clicking on the cloud icon on the left. It is BETTER to go with the defaults which they provide.

Configure DNS

4. Settings – on this step I have chosen the Free plan, Performance:CDN + basic optimization, Security: Medium.

5. Update Servers – It is the technical part. Now they will ask you to change name server. To do that you have to login to your DNS provider.

[If you are using Hostgator , follow these steps. Login to gbclient.hostgator.com > View Domain Names > Select Domain Name > Update Information]

Do this at low traffic time of your site.

Update servers

6. Allow upto 24-48 hours for your domain to fully propagate across the Internet. But it took only few minutes for me.

7. You can also use CloudFlare WordPress Plugin to get correct IP Address information for comments and for better protection. I don’t use this plugin.

After activation you will be able to know how CloudFlare protect your site from threat, Bandwidth Save information etc. For more information and setting tips, please visit CloudFlare top tips section.

Configure W3 Total Cache for Cloudflare

If you are using W3 Total Cache plugin, then go to the plugin setting, scroll down and you will find Network Performance & Security powered by Cloudflare box. Now insert your API key, domain and E-mail which you provided at CloudFlare.

W3 Total Cache for Cloudflare

That’s it, you are done. Now your site will be secure and will load more faster then usual.

Also read: Speed up your WordPress Blog using .htaccess

If you face any difficulties in these steps, please let me know. If you find this tutorial useful don’t forget to share with it on Facebook and Google plus.

  • narendra says:

    Great details about cdn istiak can you give me more free cdn site details…

    • Istiak Rayhan says:

      Here are some free CDN sites: CoralCDN, FreeCast, Exabytes.

  • shakil says:

    Nice post Istiak. I was getting too much downtime with cloudflare and finally left it.
    Cloudflare changes a domain’s ip to an ip used by so many other users. Does it look like spammy?

    • Istiak Rayhan says:

      As far as I know it doesn’t look spammy.

  • Hi Istiak,

    That’s a great write up about CDN and Cloudflare.

    I’ve used Cloudflare for my blog and found it extremely helpful at first. I was a little concerned about changing my DNS but went with it and found it all worked really well.

    My hosting came up for renewal and due to some concerns I decided to change hosting providers and went to Hostgator. I changed all my settings in Cloudflare and thought it would be as good as it was before.

    However once I changed hosting I had all sorts of issues and found my site was experiencing issues with data base limits and was displaying 500 error messages when people visited.

    Cloudflare should have had a recent version of my site so people could still make use of it but alas that didn’t work.

    In the end I stopped using Cloudflare and to date haven’t had any issues with my CPU limits or data base limits.

    I do understand that by using Cloudflare we make it easier for people around the world to access our site at speed and that worked well until I changed hosting.

    So my advise to people would be that if your hosting is due for renewal and you’re thinking of changing hosting providers do that before setting up Cloudflare.

    I hope that helps some of your readers Istiak :)

    Barry

    • Istiak Rayhan says:

      Hey Barry, Thanks for sharing your experience with us. Obviously it will be helpful for those who want to change their hosting.
      BTW I am going to add your advise on the post.

    • Imran Topu Sardar says:

      Really It is very helpful Istiak Rayhan, Also thanks Barry Wells.
      It would be helpful for all.
      :)

  • I didn’t have detail idea about cloudfare. Thanks for sharing in detail. I am using MaxCDN and so far it has increased my site speed a way lot.

    • Istiak Rayhan says:

      Yeah, MaxCDN is best for premium service.

  • Chadrack says:

    You really make this look so simple but I must say my experience was not that pleasant. After I have heard so much about cloudfare, I’m using the total cache plugin which has options for it anyway, I decided to try it out. But after changing the DNS I discovered that my blog suddenly went offline. I was really alarmed. I tried what I can but to no avail. I had no other choice than to change the DNS back to my host account and then once they propagated, the blog was back online. I really cannot say what went wrong but I think it will take me some time to try it again!

    • Istiak Rayhan says:

      I couldn’t understand what happened with you. But it took only few minutes for me to start work.

  • Amol @ ConnectAmol says:

    Honestly speaking, I never heard about this Cloudflare. thanks to aware me and it’s really helpful.

    • Istiak Rayhan says:

      So are you going to try it out?

  • Iteire Apollos says:

    I use Cloudflare CDN and it has being so fantastic. I was wondering what else they will offer when i use a paid service.

    • Istiak Rayhan says:

      In some cases. Free Cloufflare CDN is better then some premium CDN.

  • Rahul says:

    very nice information step by step guide to CDN setup its provide better ranking on search engine thanks for sharing.. :)

  • After my experience with CloudFlare i recommend every blogger or site owner use this service. I recently received a warning from Google about my site’s page speed saying “Serve resources from a consistent URL
    We have analyzed some of the pages on your sites that serve the most ads, and have detected Page Speed problems that create a highly negative user experience for some users. Frequently viewed pages on your sites are serving the same resource from multiple URLs, wasting client bandwidth and resources.”

    So when I analyzed the warning above it was obvious page speed problem was the main issue, so I figured if I can improve my page speed then the problem will be solved. Then i implemented CloudFlare and since then i have experienced a faster page load speed, improved ranking and my visitors tend to spend more time on my blog now as my daily pageviews is a great indication to this.

    • Istiak Rayhan says:

      Hey Nwosu, Thanks for sharing your experience with us. It’s true that Google considers site speed on ranking. I’ve been using CloudFlare CDN for few weeks. And I must say CloudFlare is the best free CDN service. It works great for me.

  • Pushpender kumar says:

    I recently found your blog on net and find this article very useful and implement this now after changing my name server after that my cpanel is not working properly how to fix this error

    • Istiak Rayhan says:

      Can you tell me Which hosting are you using for your website?

      • Pushpender kumar says:

        ns1.Ourciplv3.info
        ns2.ourciplv3.info

        • Istiak Rayhan says:

          I never faced this problem before. So I can’t say you the exact solution. So it’s better to contact with your Host Provider.

  • Janmejai says:

    How will i get the API key if i am using Cloudflare from my Hosting Panel?

  • jonests says:

    I’ve decided to use Cloudflare hope it works for me.My main goal is speeding up my web pages.

    • Istiak Rayhan says:

      Good decision. Hope it will increase your site speed.

  • Bhavesh Sondagar says:

    Hi Istiak Rayhan,
    I am using cloudflare but w2 total cache plugin seems not working with cloudflare setting, I have downloaded cloudflare plugin for WordPress and configured it, it’s working perfectly.

    I have been using cloudflare on almost all of my blogs, it’s really prevent spam and bad bots attack to blogs. Thanks for the great post.

  • Vjay says:

    I was unaware about CDN service but after reading your article i think CDN service is must for every site to increase website performance.

  • Hey Istiak,

    I’m hosting my blog on shared hosting which is useful for newbie bloggers. After connecting my site with CloudFlare, site loading speeds up. CloudFlare saves some amount of bandwidth from unwanted bot traffic. Each and every site should need CDN because it helps your website performances better than a competitor.

    Thanks