0


I've found this module which prevent spam bot on magento 2.
But i've a question: i don't know how this spam bot list work.
How do we know what's the name of the spam bot and put it in this list so this feature can do the job?
In other words, how do we detect the spam bot list?
Thanks for reading. Have a nice day. enter image description here

0

I've found it.
We can detect the spam bot with user-agent.

public function __construct(
    \Magento\Framework\HTTP\Header $httpHeader
) {
    $this->httpHeader = $httpHeader;
}

$userAgent = $this->httpHeader->getHttpUserAgent();

Ex: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html), then Googlebot is the spam bot we've detected.

I've found the answer in this link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.