using htaccess, I want to block as many backliink checking tools as possible. I have already done some research on this (including searching this forum) but I have not been able to find a solution. I have found several proposed solutions, but not one that's confirmed working by more than one person.
I will post them here:
solution 1:
solution 2:
solution 3:
solution 4:
In addition to these, I want to block
BLEXbot
Blekkobot
SEOkicks-Robot
I dont know anything about apache and these are codes that I just found online. I have no clue which one would work and which one would not. If you could just let me know which solution is best (and maybe your reasoning), that would be really appreciated.
I will post them here:
solution 1:
Code:
BrowserMatchNoCase rogerbot bad_bot
BrowserMatchNoCase exabot bad_bot
BrowserMatchNoCase MJ12bot bad_bot
BrowserMatchNoCase dotbot bad_bot
BrowserMatchNoCase gigabot bad_bot
BrowserMatchNoCase AhrefsBot bad_bot
Order Deny,Allow
Deny from env=bad_bot
solution 2:
Code:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^rogerbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^exabot [OR]
RewriteCond %{HTTP_USER_AGENT} ^MJ12bot [OR]
RewriteCond %{HTTP_USER_AGENT} ^dotbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^gigabot [OR]
RewriteCond %{HTTP_USER_AGENT} ^AhrefsBot
RewriteRule .* - [F]
solution 3:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^rogerbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^exabot [OR]
RewriteCond %{HTTP_USER_AGENT} ^MJ12bot [OR]
RewriteCond %{HTTP_USER_AGENT} ^dotbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^gigabot [OR]
RewriteCond %{HTTP_USER_AGENT} ^AhrefsBot
RewriteRule ^.* - [F,L]
solution 4:
Code:
SetEnvIfNoCase User-Agent .*rogerbot.* bad_bot
SetEnvIfNoCase User-Agent .*exabot.* bad_bot
SetEnvIfNoCase User-Agent .*mj12bot.* bad_bot
SetEnvIfNoCase User-Agent .*dotbot.* bad_bot
SetEnvIfNoCase User-Agent .*gigabot.* bad_bot
SetEnvIfNoCase User-Agent .*ahrefsbot.* bad_bot
SetEnvIfNoCase User-Agent .*sitebot.* bad_bot
<Limit GET POST HEAD>
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>
In addition to these, I want to block
BLEXbot
Blekkobot
SEOkicks-Robot
I dont know anything about apache and these are codes that I just found online. I have no clue which one would work and which one would not. If you could just let me know which solution is best (and maybe your reasoning), that would be really appreciated.