It seems like there has been a massive uptick in automated bot spammers crawling my sites lately and I really don’t like the trail they leave behind.  Besides taking up bandwidth, they are wreaking all sorts of havoc on my site analytics and throwing bounce rates out of wack.  I have tried a bunch of different approaches to try and block them but none have worked until now.

All you have to do is add the following to your htaccess file and it will keep the crawlers from access your site:

# Block fake traffic
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*savetubevideo\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*srecorder\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*semalt\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*kambasoft\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*buttons-for-website\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*savetubevideo\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*seoanalyses\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*darodar\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*ilovevitaly\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*priceg\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*blackhatworth\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*ilovevitaly\.co\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*srecorder\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*hulfingtonpost\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*anticrawler\.org\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*coderstate\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*wmasterlead\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*sharebutton\.net\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*seopub\.net\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*livefixer\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*adspart\.com\ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*darodar\.com\ [NC,OR]
RewriteRule ^(.*)$ http://semalt.com/ [L]

If you want to add a site to the list just replace the name of the site above and make sure you have the correct domain extension. The last line tells where to redirect the referral spam. In this case we are just sending it all right back to the guys who started this in the first place, Semalt.

This Post Has 2 Comments

  1. Niklas

    Does this work for you. I have tried but semalt still visits my site.

    1. Chris Moore

      I wound up using a different code and updated the post. As of today I can confirm that this does work and is blocking referral spam well for me. I will keep adding spammers to it for future use.

Leave a Reply

Get in Touch

Please fill out the form below and we will get back to you ASAP

  • This field is for validation purposes and should be left unchanged.