I periodically check my blog stats with Google Analytics, something I did the other night. Take a look at the traffic graph (click the image to see a bigger version):
As you can see, something happened around the 5th Feb that knocked about 75% of the normal traffic off the site! Obviously I was bothered about this and so decided to investigate. The question is, where to start? First I started by checking why the traffic dropped. Searching Google for terms I know I normally rank for proved it, I was no way near the top for many of the search terms I normal am for.
The first thing to do was to check Google Webmaster Tools, which is a great resource for managing your site and for getting notified of any issues that Google finds with your site. Initially it identified a missing page, which has 4 links on my site pointing to it. I was aware of this (will fix it one day) which was caused a couple of years ago when I renamed a category. So nope, that wasn’t it. What else?
Webmaster Tools didn’t throw up any specific warnings so I had to delve a bit deeper. The Crawl Statistics page was the first page that started to give a hint as to what was going on, take a look:
Compare the pages downloaded per day to the bandwidth per day graphs. You can see that the number of pages that the Googlebot is crawling has stayed pretty much the same (i.e. each time Google visits my blog) , but the amount of bandwidth google downloaded per day more than doubles around the 5th Feb. Coincidence? I think not!
Let’s think about this, if the pages downloaded is the same number but the bandwidth has increased, then the physical size of each page must have increased. About doubled in fact. I was starting to get a déjà vu feeling here, somewhat similar to when my wordpress blog was hacked last year.
So off to another Webmaster Tools page, the one that shows what Google sees on your site. There it lists the external links to your site, but also the keywords that Google has identified. Here’s what Google thinks my site is about, in descending order of importance:
WTF!!! You can see Crossfit down in 18th place and my blog is certainly nothing to do with ringtones. There we go, proof my website was hacked. Now to check: off to Google to check the cache that Google keeps of my site. However there was nothing obvious on the normal cache, until I looked at the Text Only Version, which is a really useful tool for assessing what Google really sees on your site. Aha, result. Take a look what I find at the very bottom of my home page (in fact every page on the site):
Damn it, hacked again. The exact same problem as last time, about 500 hidden links inserted at the bottom of the page. The last time this happened, I had not updated my WordPress version for some time, mostly due to laziness and fear of the upgrade breaking something.
This time however, I was only just behind the latest version. I had the latest 2.6.x version (I forget what the x was, 2.6.5 I think, but it was the latest). However WordPress v2.7 was out and I hadn’t upgraded to it. Mostly because it was a major re-write of the WordPress admin user interface and I was waiting for a point release (i.e. 2.7.1) before upgrading to make sure any problems with the latest release had been ironed out.
That was obviously going to have to change, so straight away I backed up the site and upgraded to WordPress 2.7.1 . A quick check of the source code showed that the errant urls had gone as a result of the upgrade, which was nice. Just to be sure though I wanted to check the Google cache. To do this, I’d have to wait for Google to re-cache the site though and I didn’t want to wait that long, or risk the hack having been done some other way I hadn’t spotted.
So using some of the cool add-ins I’ve got with FireFox (you do use FireFox instead of Internet Explorer don’t you??) to disable java script and turn off Cascading Style Sheets (CSS) so as to see a virtually text only version of the page, and it looks like this:
Magic, dodgy urls gone. Lessons then: 1) Keep up to date with WordPress upgrade versions. 2) Think of some way to monitor and identify if this happens again.
Also I want my rankings back as soon as possible. It’s likely that when Google re-caches my site, it should sort itself out, but in order to make sure there were no lingering spam penalties, I have filed a Google Reinclusion Request (another feature of Google Webmaster Tools). I’ll be checking to see how my rankings are over the next few weeks and will report back if things don’t go according to plan.