Answer the question
In order to leave comments, you need to log in
How to protect yourself from DDoS from YandexBot/3.0?
Hello!
From time to time I observe bursts of traffic from YandexBot/3.0 on my various sites.
Here is the request header
/?gclid=CLP4ovuGrcYCFejJtAodauILSQ///////////////////////
ru,uk,be,en,*
{"connection":"upgrade","host" :"whitehouse-koblevo.com","x-real-ip":"5.255.253.151","x-forwarded-for":"5.255.253.151","user-agent":"Mozilla/5.0 (compatible; YandexBot/3.0; + yandex.com/bots) ","from":"[email protected]","accept-encoding":"gzip,deflate","accept-language":"ru, uk; q=0.8, be;q=0.8, en;q=0.7, *;q=0.01","accept":"*/*"}
Answer the question
In order to leave comments, you need to log in
<?php
$content='"{\"orderId\":\"ORDER-294\",\"paymentState\":\"CANCELED\",\"signature\":\"naK+I79FduGkXFHpVT\/aJT31EfQ=\",\"message\":\"\u041a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b \u043e\u043f\u043b\u0430\u0442\u0443\",\"storeId\":\"158CC6EE85DA472AB3FB\"}"';
$res=json_decode(json_decode($content), true);
print_r($res);
/*Array
(
[orderId] => ORDER-294
[paymentState] => CANCELED
[signature] => naK+I79FduGkXFHpVT/aJT31EfQ=
[message] => Клиент не завершил оплату
[storeId] => 158CC6EE85DA472AB3FB
)
*/
strip first and last character, apply stripslashes, then json_decode
it’s just a Yandex spider,
set it up in a robot so that it only comes to you at night, for example, or optimize the site so that it doesn’t notice it, since 4-5 requests per second are not many, for many pages there are 60 requests per second sent by a spider and then already harder to live.
Yandex technical support replied:
Yes, this robot belongs to us. If you want to reduce the load on your server, I recommend that you place the Crawl-delay directive with the appropriate value in the robots.txt file: yandex.ru/support/webmaster/controlling-robot/robots-txt.xml#crawl-delay.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question