To block unwanted bots you have to edit .htaccess file. To edit .htaccess file login to your cPanel account click file manager.

 

 

After that open public_html folder you will see list of wordpress files. To edit .htaccess you have to unhide the htaccess file. To unhide htaccess file click Settings on the right top corner.

 

After clicking settings preference box will appear click show hidden files and save it.

After that .htaccess file will appear you can edit and block bots that you don't want to access your site like the code given below.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
SetEnvIfNoCase User-Agent .rogerbot. bad_bot
SetEnvIfNoCase User-Agent .exabot. bad_bot
SetEnvIfNoCase User-Agent .mozbot. bad_bot
SetEnvIfNoCase User-Agent .dotbot. bad_bot
SetEnvIfNoCase User-Agent .gigabot. bad_bot
SetEnvIfNoCase User-Agent .sitebot. bad_bot
SetEnvIfNoCase User-Agent .ahrefsbot. bad_bot
SetEnvIfNoCase User-Agent .mj12bot. bad_bot
SetEnvIfNoCase User-Agent "MJ12bot" bad_bot
SetEnvIfNoCase User-Agent "coccocbot-image" bad_bot
SetEnvIfNoCase User-Agent "Baiduspider" bad_bot
SetEnvIfNoCase User-Agent "SemrushBot" bad_bot
SetEnvIfNoCase User-Agent "DotBot" bad_bot
SetEnvIfNoCase User-Agent "AlphaBot" bad_bot
SetEnvIfNoCase User-Agent "ZoominfoBot" bad_bot
SetEnvIfNoCase User-Agent "ADmantX" bad_bot
SetEnvIfNoCase User-Agent "Heritrix" bad_bot
SetEnvIfNoCase User-Agent "Indy Library" bad_bot
SetEnvIfNoCase User-Agent "Mail.Ru" bad_bot
SetEnvIfNoCase User-Agent "rogerbot" bad_bot
SetEnvIfNoCase User-Agent "PHPCrawl" bad_bot
SetEnvIfNoCase User-Agent "BLEXBot" bad_bot
SetEnvIfNoCase User-Agent "magpie-crawler" bad_bot
SetEnvIfNoCase User-Agent "SeznamBot" bad_bot
SetEnvIfNoCase User-Agent "seoscanners.net" bad_bot
SetEnvIfNoCase User-Agent "ZumBot" bad_bot
SetEnvIfNoCase User-Agent "Yandex" bad_bot
SetEnvIfNoCase User-Agent "MaxPointCrawler" bad_bot
SetEnvIfNoCase User-Agent "Nutch" bad_bot
SetEnvIfNoCase User-Agent "Buzzbot" bad_bot
<Limit GET POST HEAD>
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>


# END WordPress

 

 

 

Was this answer helpful? 28 Users Found This Useful (46 Votes)