Use .htaccess to Block Yandex, Baidu, and MJ12bot
snippet in htaccess

Use .htaccess to Block Yandex, Baidu, and MJ12bot

user4387

SetEnvIfNoCase User-agent (yandex|baidu|foobar) not-allowed=1

 Order Allow,Deny
Allow from ALL
Deny from env=not-allowed