Artificial intelligent assistant

How to Block all Bots using .htaccess? I have noticed that Bing bot doesn't follow robots.txt rules Because i disallowed all bots but Bing bot doesn't follow the rules I block some bots using .htaccess is there a code to Block all Bots?

All robots ought to be blocked by `/robots.txt` (not by `.htaccess`), like this:


# cat robots.txt
User-agent: *
Disallow: /


The file needs to be in the document root and world readable. Check by opening it in a web browser: ` should give the file contents.

Robots may technically chose not to follow this but really ought to. Bing does I am sure.

If for some reason (unlikely with the actual Bing) this does not work, try


# cat .htaccess
SetEnvIfNoCase User-Agent .*bot.* search_robot
SetEnvIfNoCase User-Agent .*bing.* search_robot
SetEnvIfNoCase User-Agent .*crawl.* search_robot
Order Deny,Allow
Deny from env=search_robot
Allow from All


You need to enable the `mod_setenvif` apache module for this, please see <

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4392aea1f995e85ddbda1ab25658cf65