How to use .htaccess to block the bad bots for Hostgator server
First, you need to find out the keywords of user agents of bad bots and use RewriteRule to block any visitor which hold those keywords from their user agents.
e.g for bots – YandexBot and SiteExplorer
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_USER_AGENT} (YandexBot|SiteExplorer) [NC] RewriteRule (.*) - [F,L] </IfModule>