Stop those pesky spam bots

Smalt spam bot funnyI don’t know about everyone else but I have been having an issue with customer complaints about spam bots visiting pages and racking up referral traffic in Google Analytics. This really isn’t a HUGE issue given you can just ignore them but for me I was having to answer a lot of questions from customers about what they were and why we shouldn’t pay any attention to them. It was also inflating visitor traffic artificially and messing up my KPIs, so BOO!

At any rate it’s been just a little more efficient to block them from visiting my customers sites then dealing with the questions. If you have a website using a basic Apache setup this is pretty easy. Just go into your htaccess file and add the following script to the end of the document.

# Bot filtering

SetEnvIfNoCase Referer semalt.com spambot=yes
SetEnvIfNoCase Referer darodar.com spambot=yes
SetEnvIfNoCase Referer buttons-for-website.com spambot=yes
SetEnvIfNoCase Referer 7makemoneyonline.com spambot=yes
Order allow,deny
Allow from all
Deny from env=spambot

I’m sure that eventually there will be a number of these companies trying this shady marketing technique so when that happens and you notice another referral bot pop up just copy the SetEnvIfNoCase Referer botname.com spambot=yes line and change what I have in green to the URL of the referral bot and add it before the Order allow,deny line and that should do it. 🙂  

I also wanted to give credit for the original code I used to Sudorank.com. Thanks for putting this out there guys!

Posted in Marketing How Tos and tagged , .