When CloudFlare and WordPress don’t get along

It’s the little things… like your website suddenly vanishing.

My website (including this blog) is hosted by Dreamhost, a great company with great service. They offer a lot of one-click installs and generally make it easy to set up a blog or email accounts or mailing lists, etc.

Recently they started offering a free CloudFlare plan to Dreamhost subscribers. CloudFlare offers two benefits: faster webpage loads (by distributing your content across different servers around the world) and community-based protection from spam, bots, crawlers, etc. I thought I’d try it out, so I signed up.

When you check the “CloudFlare” box, Dreamhost warns that you need to allow them to redirect all traffic that comes in as http://mydomain.com/ to http://www.mydomain.com/. This seems harmless enough, and it worked fine for me at first, until I realized that one of my WordPress installations stopped working. Trying to visit https://www.wkiri.com/comphist/ or https://wkiri.com/comphist both resulted in an error: “Too many redirects.” Oddly, my other blog (https://www.wkiri.com/today/) did not have this problem.

I couldn’t find a good, concise description of how to fix this on the web, so I’m posting about it here. Basically, the problem occurs when your WordPress installation has its location specified as http://mydomain.com/something instead of http://www.mydomain.com/something. CloudFlare redirects incoming URL requests to http://www.mydomain.com/, WordPress redirects this to http://mydomain.com/, and so on until the server gets sick of it and tells you “Too many redirects.”

To fix it:

  1. Turn off CloudFlare (otherwise you can’t get in to your WordPress settings). Go to your Dreamhost panel, click “Manage Domains”, then click “Edit” for the domain in question. Scroll down to “CloudFlare Services” and uncheck the box. Scroll down and click “Change settings.”
  2. Keep reloading your WordPress site until it works (i.e., the DNS updates propagate).
  3. Log in to your WordPress site and go to the Dashboard. Click “Settings”. Update the “WordPress Address (URL)” and “Site Address (URL)” fields to have the form http://www.mydomain.com/something. Scroll down and click “Save Changes”.
  4. You may or may not also need to clear your browser’s cookies for this site.
  5. Go back to the Dreamhost panel, re-enable CloudFlare, and save settings.
  6. Everything should now work! (Again, DNS updates have to propagate for CloudFlare to be activated again.)

Blocking Flash in Chrome

I have the Flashblock add-on for Firefox that allows me to selectively click to allow Flash to run when I want to, and otherwise nothing happens. This makes for a calmer, quieter, more enjoyable web browsing experience. (You can add permanent always-run exceptions for well behaved, regularly visited sites so that clicking-to-flash doesn’t get annoying.)

Lately I’ve started experimenting with Chrome, and I wanted to see if it had a similar add-on. There is a Google Chrome extension called FlashBlock, but it turns out that you don’t need to explicitly add this (or anything). Thanks to these instructions, I learned that all you have to do is:

  1. Type “about:flags” in a new browser window/tab. Scroll down to where it says “Click to play” and click “Enable.” Scroll to the bottom of the page and click “Relaunch browser.”
  2. In your relaunched browser (took me two launches), go to Preferences (Cmd-,), click “Under the Hood,” click “Content Settings,” then scroll down to “Plug-ins” and select the “Click to play” radio button (which is not visible if you haven’t done step 1).
  3. Go to some Flash-y site like youtube.com and test it out. Nice!

Health care jackpot!

I approached my doctor’s office’s “Patient Online Portal” with curiosity but some skepticism: would it be yet another website and login, with only generic advice about drinking more water and exercising more often?

I was therefore delighted to discover that the HealthCare Partners site is a goldmine of exactly the data you’d hope to be able to access. It reports all of the data they’ve collected about me from every visit, including “vital signs” like weight, blood pressure, and pulse, as well as every immunization and lab test I’ve received.

The lab tests are particularly interesting and useful. I have a file folder at home with all of the printout results I’ve received over time, but having them all organized together electronically makes them much easier to browse, and any changes over time to be highlighted. Not only that, but each test is linked to an *extensive* online description of what the test is, how it is conducted, what gets measured, and what the result means. This is far more information than I ever got from mailed results, and especially handy when you go in for a generic “checkup” and come out with a battery of results from tests you didn’t specifically order. For example, apparently the albumin test detects kidney or liver disease.

Kudos to HCP for creating a well designed, informative website!

Who reads this blog

StatPress is a WordPress plugin that tracks site visitors and which pages they visit. Over the past couple of months, I’ve learned that this site gets 1000+ visitors each month (not necessarily unique) plus about 5000 visits from spiders (!). On April 22, there were 474 visitors in a single day. Slow world news day, perhaps?

Who are these visitors, and what do they come to see?

In aggregate, visitors to this site use:

  • Operating system: Windows XP dominates the list, at about 50% of visits. It is followed by Mac OS X (17%), Windows Vista (15%), and Debian (9%). I’ve also had 3 visits from a BlackBerry, 1 from WebTV, and 1 from something called Symbian.
  • Browser: Firefox 3 handily tops the list (36%), followed by IE 6 (20%) and IE 7 (19%). Next is Iceweasel (9%), which is a rebranded version of Firefox.

It’s fascinating to browse the search terms people typed that led them to my blog. The ten most recent were:

  • what did i learn in psychology class
  • touch sensitive dimmer stuck on
  • what i learned today blog
  • touch lamp won’t turn off
  • Basketweave knit pattern
  • what I learned today
  • Reverse Corte
  • problems with touch lamps
  • indent négatif latex
  • how much baking powder to add?

And overall, the most visited pages are:

Any other favorites?

In addition to people-visits, this site also sees a lot of spiders. Interestingly, although referrals from google dominate all other search engines, I see many more spider visits from yahoo. Could it be that google has a more efficient spidering strategy, requiring fewer visits? Or yahoo is more fond of my site? We may never know. I also learned about search engines I’d never heard of, including Moreover, Naver (South Korea), Searchme (a “visual search engine” that just went offline today due to lack of venture capital), and Radian6.

How to fix your own printer

Now that I have my linux machine, astra, up and running again, one of the next things is to set it up to serve access to my printer, nova, over my local wireless network. (Nova is just as old as astra, and can only be accessed via parallel port, which my Mac laptop lacks.) But when I tried a test-print from astra, just using the regular parallel cable connection, to my dismay I discovered that nova had degraded due to neglect and age: it wouldn’t feed paper correctly. I couldn’t print. Argh!

After some googling, I determined that it would cost on the order of $50 + parts to have someone fix the printer. Not *bad*, but at that price it’s time to start thinking about just buying a new printer. But I’m stubborn, and I kept googling. And what do you know — I found fixyourownprinter.com (in contrast to fixyourprinter.com, which redirects to xerox.com).

Apparently, my particular problem (bad feeding for an HP 1100 LaserJet) is one of their most common items (It turns out your printer here is only *mostly* dead!), and they sell a kit to solve it. Could it be? $19.95 + shipping, and I could not only save money, but achieve the moral victory of having fixed my own printer? The testimonials raved about success after success with this kit, many emphasizing how useful the accompanying video was.

So I went ahead and ordered one. I got it the next day (priority mail) and eagerly ripped open the envelope to find… four sheets of paper. A receipt, an ad for other kits, a half-sheet of instructions, and one page containing 3 photographs of some steps in the process, with a replacement “separation pad” stapled to the sheet. No video. Had I been duped?

With little expectation of success, I followed the instructions and replaced this little pad that the printer uses to pick up sheets. And ten minutes later, I kid you not, I sent a print job to nova… and it worked! As good as new! It’s practically magical!

So my apologies to fixyourownprinter.com for doubting them. Their kit worked like a charm and I did, in fact, manage to fix my very own printer. Whee!

NB: I googled the separation pad and found that you can order it for $4 + shipping online. Now that I know how to replace it, that’s what I’d do in the future. But hey, $10-15 extra for the experience of learning a new repair skill? So worth it.

Older entries »