RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (spambot|AhrefsBot|SemrushBot|MJ12bot|DotBot|BLEXBot) [NC]
RewriteRule .* - [F,L]