Moving This Site To CloudFlare Was A Breeze

CloudFlare Logo
Those of you who visit this site regularly might notice it’s running a little faster today. Hopefully (though harder to notice) it is more secure as well. This is all because I moved to CloudFlare last night and took me about 5 minutes worth of work.

What Is CloudFlare?

CloudFlare is a reverse proxy service that caches your website and then serves it back to visitors. Instead of pointing your domain directly to your website you point it to CloudFare’s service. When a user visits your site CloudFlare downloads your site to its servers and forwards them on the visitor. Then when the next visitor comes along it already has a copy of your site which it can send to them much faster than your own server could.

In addition to speed improvements CloudFlare also offers security benefits by anaylizing visitors across its network and using that data to help further protect each of its sites.

Finally, CloudFlare offers basic analytics capabilities and the option to integrate with various add-ons ranging from Google Analytics to Pingdom and others.

How Do I Set Up CloudFlare?

Setup is easy. Sign up for an account at CloudFlare.com, and change the DNS settings of your domain to point to the CloudFlare DNS servers (they have a pretty good tutorial on how to accomplish this when you sign up). They will do the rest.

Is There Anything I Should Watch Out For?

On this site I only had one problem. I use Amazon’s CloudFront as a CDN and at first CloudFlare tried to serve up my CDN data as well as my regular site data. Fortunately the fix was easy. All I had to do was go to the CloudFlare website and turn off my caching of my CDN domain in the DNS settings. Problem solved.

One other note is that improvements might not show up immediately due to how long servers on the web may have cached your DNS settings that were changed during sign-up. In addition, if you have a problem such as the one I had with the CDN domain you might not know it right away as some servers will pick up that DNS change faster than others. One suggestion is to start testing your site with a service like WebPagetest.org and WhoIsHostingThis.com shortly after you complete the setup. WebPatetest.org will give you a screen shot of your site and which, in my case, was quite a bit off of what it should have been (no images, CSS styling, etc). As I could see this happening on their screenshot before I could see the changes myself it was then rather easy to find and fix the problem.

Did It Work?

It’s early yet, but tests from WebPagetest.org have shown load times cut from a range of 4 to 8 seconds down to 2 or 3. If that holds up I would say it’s a great success. Watching their analytics I also find the number of potential threat visitors fairly interesting, comparing the number of threats CloudFlare sees to the complete absence of any new spam caught by Akismet since I turned on CloudFlare tells me it’s probably doing a pretty good job.

I’ve actually been so impressed with early results and the analytics in CloudFlare that I’ve shut off WordPress.com’s statistics entirely and turned off the Google Analytics plugin in WordPress in favor of the integration provided by CloudFlare. For me any service that can help me reduce the number of plugins I use on my site is almost always a good thing.

Do you use CloudFlare? What has been your experience with the service?

About Chris Wiegman

Chris is the owner of Bit51 where he blogs about web development and works on WordPress plugins such as Better WP Security. In addition Chris is a Senior Developer for Springbox in Austin, TX where he develops a host of solutions for clients large and small.

Find Chris on Facebook, , LinkedIn, and Twitter.

  • http://readipress.com R. Anthony Solis

    We use CloudFlare and Incapsula. Both are great services and bring a lot of critical applications to us smaller businesses.

    While using CloudFlare for a month or so, we did have CDN node issues. The site would be up for one part of the World and down for another. This happened intermittently during our usage of CloudFlare. The CF support was quick to respond and fix; however our clients were not so happy.

    Today, we use Incapsula with caching off because we have found w3 Total Cache w/ a CDN to be just as effective and we could control more settings. Plus the proxy caching w/ plugin caching was causing trouble for some plugins like WPTouch Pro.

    What’s especially great about these services is we are taking a pro-active approach to security by preventing the bad guys from reaching the site. Tim Thumb? Who’s that? :)

    We’ll be adding mixing it up w/ CloudFlare in the near future. I love their DNS management console!

    Anthony

  • http://bit51.com Chris Wiegman

    Thanks, I had seen Incapsula, but your the first I’ve heard from using it.

    I have to agree the security is pretty awesome. Anything to help in that respect is a plus in my book.

  • http://nokiabuzz.com Kamran

    Is Cloudfare a Web Host or a third party integration ?

    Like My domian is now pointed to GoDaddy host (I purchased it seriously)

    So pointing my DNS to Cloudflare will change my host ?
    I didn’t get it. My Bad :-(

  • http://nokiabuzz.com Kamran

    It would have been great if you reply to me, I really wants to know. Should I move to cloudfare or not ?

    And Thank you for all the posts. I read what i like & finally made some changes to my site..
    1. Plugins – 29 to 17
    2. Site Load – 8.69 to 1.78 secs :-)

  • http://chriswiegman.com Chris Wiegman

    That’s hard to say. Try it and see what it does for you. In my case on this host it slows me down however your experience might very easily be quite different.