Firewall rule not working with referral traffic

Not sure if this is done correctly but we are starting to get referral traffic from an unknown source. We tried to make a firewall rule but still does not seem to be working

any help is appreciated attached are images

This is the correct image

I’d leave off the .club part since you’re only doing a ‘contains’ match.

Are you actually seeing that Referer header in your logs?

yes this is how it appears in analytics

That should do it, then. Can you post the domain so we can verify if the rule works? There’s always the chance they’re bypassing Cloudflare and hitting your origin directly. In which case you’d need to firewall off anything not coming from Cloudflare IP addresses.

That is all i have on that site if you type it in it goes to https://www.gammatraffic.com/

I just tested this on my test domain. It looks like the dot in the referrer hostname is a problem. Get rid of the .club and it should work.

Ok this is what it looks like as of now to be sure. Sorry im fairly new to cloudflare

I can’t see what’s below that if you’ve set it to Block. Also, is this the first rule in your Firewall Rules list?

I ask because it’s not working like mine does.

Yes this is my first rule. It does not seem to be working on ours

Time to start experimenting with crazy Firewall rules, like blocking your own IP address, Country, or some random URL/path/filename. Something has to work.

Yea i was going to block countries seems like it comes from france and ukraine. I did try and reach out to the company to find out why traffic was coming.

Thanks for the help ill leave it as is and see if anything changes.

1 Like

When i decided to block by countries it seems to work. Very strange

1 Like

Hi, having same issue, can’t block this spam traffic ussing “referral” contains.

Can you please explain a lil’ bit about blocking by country rule in this case?

This topic was automatically closed after 31 days. New replies are no longer allowed.