How to Block "Hostname" Using Firewall Rule

Good Day!

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

Hostname: (and any other IP derivatives such as

Our Firewall Rule has been set up as follows:

Field: Hostname
Operator: contains
Value: *

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 … 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.


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


Brilliant. Thank you!

1 Like

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