If you’re tired of seeing faux results in your Analytics reports and have been looking for a solution to ban the Semalt and buttons-for-websites referrals then here is the .htaccess code I used that worked to completely eliminate bot visits.

# Block all http and https referrals from semalt.com" and all subdomains of "semalt.com"
RewriteCond %{HTTP_REFERER} semalt\.com [NC]
RewriteRule .* – [F]
# End semalt block
# block referer spam buttons for website
RewriteCond %{HTTP_REFERER} buttons\-for\-website\.com
RewriteRule ^.* - [F,L]
# End buttons for website block

I’ve tried other iterations but the code above was the only version that completely eliminated the bot visits. As an aside, my WordPress spam comments went down 90% as well. Hope this works for you and your websites as well.