How to set it up
This isn’t a detailed walk-through but should give you enough information to get going. Additional instruction and suggestions are available online and on CloudFlare’s website.
1. Configure CloudFlare to point to your blog
You’ll need to register at cloudflare.com and add your domain. They walk you through the steps but everything can be changed later so if you’re not sure what to do just keep clicking the Continue button until you’re done.
At this point, the only configuration you really need to figure out is your DNS Settings. Normally, when you buy the Domain Mapping upgrade at wordpress.com, you set the nameservers at your domain registrar to those specified in wordpress.com’s support document. The goal here is to configure the CloudFlare DNS to resolve to the same locations as the wordpress.com nameservers do for your domain.
ASIDE: Please sir, may I have a hostname?
To use CloudFlare nameservers in place of the wordpress.com nameservers you should configure your domain as an alias of the canonical name lb.wordpress.com in the CloudFlare DNS configuration. Like this:
If you click on the blue “i” next to your domain you’ll see a note explaining that root domain CNAME records are not supported in the DNS spec. According to CloudFlare support it isn’t an issue and they have thousands of users on Amazon and Heroku with a similar setup.
2. Configure your domain registrar to point to CloudFlare
The CloudFlare DNS Settings page for your domain displays your assigned nameservers. These are the nameservers (that you configured in step 1) which you will use in place of wordpress.com’s nameservers. Mine were dan.ns.cloudflare.com and mary.ns.cloudflare.com. Go to your domain registrar (the company from which you purchased your domain name) and find the nameserver configuration. Set the nameservers for your domain to those provided by CloudFlare. My setup at GoDaddy:
DNS changes can take a while to update. Generally it’s a few hours, but it could take days. To verify that the changes are ready try to resolve your domain name using dig, nslookup or an online tool. Use a DNS propagation checking tool for more reliable results. In my case, typing “nslookup jonathonbalogh.com” returns 184.108.40.206 and 220.127.116.11. A quick whois check confirms that these are CloudFlare nameservers.
3. Play with CloudFlare settings
CloudFlare has a lot of configuration options but after experiencing a site timeout issue (more below) I got nervous and turned off everything I could. These are the settings I’m currently using:
Security and performance:
Email address obfuscation:
Does it work?
Honestly, I was pretty happy with how well this worked. Do a “view source” on this page (for most browsers you’ll see the option by right clicking anywhere on the page) and you’ll see the cloudflare header and some injected GA code (search for “trackPageview” to find it). Do the same thing on my About page and you’ll notice that while my email address is shown in the rendered page it isn’t in the code (search for “jono” to not find it). Sweet. What could be better? WordPress.com and Google Analytics, happy together at last! This and a thousand other features are all free from the wonderful folks at CloudFlare. What’s not to like?
Actually, as with most things, there are some caveats. First of all, if you do this, you’ll be directly relying on another service (this is DNS, after all). If CloudFlare goes down, for whatever reason, then your blog’s going down too. Bummer, eh? Personally, this added complexity is exactly the sort of thing I was trying to avoid in the first place by using wordpress.com instead of hosting a WordPress blog myself.
I mentioned earlier that I dropped the performance settings as low as they would go. Frankly, WordPress.com is snappy and reliable enough (and my blog traffic is paltry enough) that I don’t really need CloudFlare’s acceleration services but that’s not why I turned them down. I did it because I was nervous. Before I embarked on this exercise I read reviews and anecdotes from others who gave the service a try. While the comments were mostly positive, some expressed concerns about CloudFlare’s reliability and usability.
Then, about a month after it was setup, I experienced an anomaly myself. My blog would either come up slowly or wouldn’t load at all from either my home or work computers but it loaded just fine from the default jonathonbalogh.wordpress.com URL (bypassing CloudFlare). I was in a hurry at the time and didn’t have a chance to investigate further but I grabbed a quick screenshot of a successful page load. As you can see, it was taking over 40 seconds to load.
I’ve been using CloudFlare for almost two months now and this happened exactly once that I know of, though I can’t say how long it lasted. I’m using a site uptime monitoring service now and it hasn’t detected any recent performance issues.
CloudFlare’s a pretty nifty service. I like the idea that I’m supported by a global delivery network that protects me from online threats. CloudFlare can even serve up a limited version of my blog when my site goes down. That’s cool, but all I really wanted out of this exercise was the ability to run Google Analytics on my wordpress.com blog. As far as I know, CloudFlare is the only option in town. So, while I’m a little concerned that there could be more outages, and that I’ve grafted a Swiss Army knife of complexity to my humble little blog, I’m nonetheless thrilled that this solution worked. I’ll be keeping an eye on CloudFlare’s performance but assuming there aren’t (m)any more anomalous performance issues I’d have no problem recommending this service.
To be clear, if I had a high traffic site I’d probably want to spend a little more time deciding if I was comfortable with CloudFlare taking on such a critical role. In particular, I’d want to know if I could trust them. Their service is compelling but do they actually understand that reliability is paramount? Would they be up front about issues? Can they support me? Are they going to be around for a while?
The first two questions were answered for me a few days ago when data center maintenance resulted in the “second significant outage in CloudFlare’s history”. Ironically, this downtime event increased my confidence in their stability. I like how they handled it. Read through some of the comments below their blog post from CloudFlare customers. The third question was answered during my extensive email exchange with one of their support reps who went out of his way to be prompt, courteous and helpful to a non-paying customer. Finally, are they here for the long haul? I don’t know, but this is mildly encouraging.
Should I base my trust in a startup on a blog post from their CEO in damage-control mode, one random support guy and a highly speculative valuation? Along with everything else I’ve seen and experienced, for the time being at least, ya, I’m willing to give this a shot. But like I said, my nascent blog is a fun hobby with little traffic and I’ve got little to lose. Your situation may be different.
UPDATE: July 2, 2012. It’s been almost 2 months since I wrote this post and there haven’t been any further issues. At this point it seems likely that if there are reliability issues with CloudFlare then they are infrequent. If you have your own domain, don’t mind messing with a few DNS settings and miss the power of Google Analytics then I’d recommend checking them out.