Mobile app version of vmapp.org
Login or Join
Shelley277

: Block rank-checker.online This is really messing with my Analytics. I've previously blocked Semalt with the following code in my .htaccess SetEnvIfNoCase Via evil-spam-proxy spammer=yes SetEnvIfNoCase

@Shelley277

Posted in: #Analytics #GoogleAnalytics #Htaccess #Spam #SpamPrevention

This is really messing with my Analytics. I've previously blocked Semalt with the following code in my .htaccess

SetEnvIfNoCase Via evil-spam-proxy spammer=yes
SetEnvIfNoCase Referer evil-spam-domain.com spammer=yes
SetEnvIfNoCase Referer evil-spam-keyword spammer=yes
SetEnvIfNoCase Via pinappleproxy spammer=yes
SetEnvIfNoCase Referer semalt.com spammer=yes
SetEnvIfNoCase Referer poker spammer=yes

Order allow,deny
Allow from all
Deny from env=spammer


However I don't really know how the code works, it appears to be blocking other bots too (I think) but the code seems a little different for some of them. How can I adapt this to account for rank-checker.online also?

Update

I've updated my .htaccess file with the following code:

# block spam bots

RewriteCond %{HTTP_REFERER} ^http://.*semalt.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*rank-checker.online/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*site-auditor.online/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*monetizationking.net/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*fix-website-errors.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*free-video-tool.com/ [NC]
RewriteRule ^(.*)$ – [F,L]


However I am still getting some bots visiting my analytics. For example today I had a few referrals from monetizationking.net despite it being in my blocked list above.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelley277

2 Comments

Sorted by latest first Latest Oldest Best

 

@Gloria169

I've started using the following code:

RewriteCond %{HTTP_REFERER} ^http://.*[bad_referrer].com/ [NC]
RewriteRule ^(.*)$ – [F,L]


This looks for the referrer, in your case semalt.com, and creates a bad request. If you want to add more conditions use [NC,OR] until you get to the last item.

If mod_rewrite isn't available, this technique will not work.

You can also find more information on the Apache Docs.

Edit: For blocking semalt, you would do the following, replacing the [bad_referrer] text with the domain you want to block.

RewriteCond %{HTTP_REFERER} ^http://.*semalt.com/ [NC]

10% popularity Vote Up Vote Down


 

@Cugini213

This isn't a direct answer to your question but to your problem:

Try a hostname filter on your Analytics account instead. Filter only for your domain. The only situation in which you'll get views without your domain being the hostname is if you're serving content on other domains - such as via an iFrame.

When it comes to crawlers, there's many techniques. I block 'mozilla compatible user agent' as a user agent as a lazy option. You can also match lists, for example: help.analyticsedge.com/spam-filter/definitive-guide-to-removing-google-analytics-spam/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme