Cleaning up spam referers in b2evolution

Finally got around to cleaning the spam out my referer logs today. I’ve been impressed by how b2evolution handles spam comments, and how well-maintained the central blacklist is (you can probably count the spam comments I’ve had on one hand). Everyone else seems to be disabling anonymous comments, or disabling comments altogether, but so far so good.

However, my referer logs looked a bit like Stalingrad in 1943, so I knuckled down to some cleaning today. It’s trivial to remove them, and tat the same time they get reported to the central blacklist.

However, to minimise the repeats, you also need to prevent the stats page from being indexed by search engines, which is why the spammers go to all the trouble to fake a referal, so they can be listed on your page and boost their own ranking. The solution is to add:

// stop search engines from indexing the stats page
if( $disp == 'stats' ) {
echo '<meta name="robots" content="noindex, nofollow" />'."\n";
}

to _main.php. Full details are available here.

So, perhaps I can risk re-enabling the link to my stats page again. I’m sure there’s at least one fanatical reader who is validly interested in who links to me 🙂

1 comment

Comments are closed.