How To Block Referral Spam Using .htaccess

Posted by Lasantha Bandara on December 21st, 2014 File Under : security, seo, wordpress0 Comment

Can you see fake referral traffic showing up from in your website's analytics? is a referrer spam affecting many Google Analytics users. When you try to visit, it redirects you to other website. In my case, it directs me to

This is how my referral traffic has increased because of In Google Analytics, I saw this in one of my website.

Darodar Referral Spam Increase in Google Analytics

Referral details:

Darodar Referral Spam Details in Analytics

You can block this Darodar referral spam easily using .htaccess file in your site root.

Copy below code and paste it into your .htaccess file:

SetEnvIfNoCase Referer spambot=yes
Order allow,deny
Allow from all
Deny from env=spambot

Note: Don't forget to backup your .htaccess file before doing any changes.

Look at the example below:

Add Darodar Block Code into htaccess

File Under : security, seo, wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.