How to Block "Hostname" Using Firewall Rule

Good Day!

We would like to block the hostname listed below using a Firewall Rule.

Hostname: 77-88-5-44.spider.yandex.com (and any other IP derivatives such as XX-XX-X-XX.spider.yandex.com)

Our Firewall Rule has been set up as follows:

Field: Hostname
Operator: contains
Value: *.spider.yandex.bot

Will the above work?

Thank you!

Sorry, but hostname only applies to your domain. Not the requester. That would require a DNS lookup, and that takes too long. You’d have to use an IP address or CIDR for Source IP

1 Like

Hi @sdayman,

As always, thank you for your help and insights.

Now, that is crazy. Why would we want to block our own domain? Also, why would Cloudflare even list the “Hostname” variable under Firewall Rules and allow is to be blocked? Shouldn’t Cloudflare “flag” rules that contain blocking of hostnames other than the user’s?

Oh well, we’ll use YandexBot for now and see what happens (or set up the block using Wordfence).

Thank you and … Merry Christmas!

Hi @sdayman (again),

Just a comment … spider.yandex.box is quite aggressive. It searches for many files (including login portals and php files) that could lead to a compromised website if not blocked via proper means. There’s always someone behind the bot checking for “open doors” or opportunities.

Cheers!

You wouldn’t block your domain. It’s just for matching. Like if hostname is us.example.com AND country IS NOT United States, then Block the request. This will stop non-US visitors from reaching your US subdomain.

2 Likes

Brilliant. Thank you!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.