How to stop bad bots from visiting your website

0
414

Recently I noticed in Google Analytics a lot of referral to the page https://www.mydomain-name.com//h/1486338.html that doesn’t exist on one of my website. Visiting the page gives a 404 error. Diving deeper into Google Analytics learned me it was all referral spam from a website called autoseoservice.org.

After searching on the Internet I found out it definitely was referral spam. Because it visits a non-existing page, but still gets counted by Google, I wanted it gone! Luckily several specialists offered a very nice solution, that works like a charme.

Add this code to the .htaccess file of your website and this kind of automated referral spam will not get on your website anymore.

 RewriteCond %{HTTP_REFERER} buttons-for-website.com [NC,OR]
 RewriteCond %{HTTP_REFERER} auto-seo-service.org [NC,OR]
 RewriteCond %{HTTP_REFERER} autoseoservice.org [NC,OR]
 RewriteCond %{HTTP_REFERER} see-your-website-here.com [NC]
 RewriteRule .* – [F]

You can add as many lines as you need to stop those referrers spam your website. Make sure the last line ends with [NC].

Always backup your .htaccess before changing it!

LEAVE A REPLY

Please enter your comment!
Please enter your name here