How to block Yandex bot?

What's worth to know?
Augie Erhard
Posts: 19
Joined: Wed May 24, 2017 9:25 am
Contact offline

How to block Yandex bot?

Post by Augie Erhard » Wed May 31, 2017 3:55 pm

I've already tried to add a line into robots.txt which has been ignored all the time. Seemingly, one thing is that Yandex read robots.txt files and absolutely different one is the free decision of taking any action accordingly to the commands for bots written in it.

How to block Yandex bot?

Juraj Vysvader
Site Admin
Posts: 46
Joined: Sat Aug 13, 2016 5:58 pm
Contact offline

Re: How to block Yandex bot?

Post by Juraj Vysvader » Thu Jun 01, 2017 7:36 am

Well, so you don't mind any visitors from Russian countries. On the one side, Yandex is a friendly search engine bot and on the other, a little bit too much of Russian spammers, hackers and whoever else mask their bots under the user agent name belonging to Yandex. Sometimes, unreasonably, it looks like that these search engines have keep tracking all the day even the smallest blogs, however, even if it has never been happening.

How about htaccess files?

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*(Yandex|Baidu).*$ [NC]
RewriteRule .* - [F,L]