Blocking incoming traffic from a specific website

I wanted to know if there was a way to block traffic coming through to my website via a link on another website. As in, if someone was on the other website and clicked a link that points to my website, they would be denied access.

Not reliably, but you can try to evaluate the referrer with firewall rules.

(http.referer ne "" and not http.referer contains "YOURDOMAIN")

Actually upon further testing, it was just blocking access to my site entirely no matter if going directly to it from typing in the URL or clicking a link :sweat_smile:

Post a screenshot of the firewall rule.

I already removed it, but I verified with scrutiny it read exactly as you had posted

So you don’t need it any more?

I do need a solution as the one you presented was blocking any access to my site from direct access.

Then you need to provide the screenshot obviously, otherwise it is impossible to say what you configured. The expression is working and will do exactly what you asked, but if you configured something incorrectly, it obviously can’t work, hence the screenshot.

Your solution does not work. Please stop marking this topic solved as it is not solved. Unless for some reason your suggestion should be altered somehow. But I am copying it 1:1 with my domain.

I verified that the rule works and it does, so please stop claiming it does not.

Unfortunately we are going a bit in circles here and you are still not providing the necessary information by deliberately censoring your screenshot. This is not what I asked for and this does not help either.

Again, the rule works and you will have misconfigured it. Post an uncensored screenshot and the domain name.

It does not work. It blocks all external traffic from other sources. not from a particular website. Please stop suggesting this resolve the problem I asked.

Of course it blocks traffic from all sites, that’s precisely what you asked.

Then I will specify that I wanted to only block a specific website

Well, in that case you just need to adjust the referrer clause to include that website. If you don’t provide the exact requirements, it is naturally difficult to know what you actually want :roll_eyes:.

I appreciate your help, but if I knew we had a misunderstanding instead of you repeatedly just saying I was wrong and marking stuff solved then I could have said something earlier.

Can you please tell me what exactly I would need to input as firewall rules are new to me.

Well, it was solved as per your initial requirements and I find your reactions slightly rude, considering that I posted a solution to your (initial) question within minutes and there was not even a single “thank you” so far but only criticism.

I would refer you to Rule expressions · Cloudflare Ruleset Engine docs for further details on how to set up the expression. You just need to invert what I originally suggested and verify for that other domain name.

I find it rude that I initially said it worked and said thank you but then realized it did not work and let you know. You suggested I was not competent in inputting what you had said and even though I said this was not the solution you somehow interpreted that as you should decide whether it was the solution for me or not instead of listening to the person with the actual problem and implementing the solution you suggested that didnt work.

I can’t find a single message in this thread that said “thank you”. But all right, then we find each other’s behaviour rude. I nonetheless just provided the information on how to set up that rule and even a link to the documentation. If you had been specific on what you wanted and what did not work, we could have avoided that, but instead your only response was that you already deleted the rule.

Anyhow, follow the previously indicated steps and use the documentation to set up the rule in question and it will block such requests.

I did not, I wrote that the rule works and that you must have misconfigured it, if it didn’t for you. You apparently did not misconfigure it, but you did not state clearly enough what you wanted to do.

But speaking of competence, considering the original rule

(http.referer ne "" and not http.referer contains "YOURDOMAIN")

and what I just wrote it should be fairly straightforward to apply the suggested steps and adjust the rule so that it blocks whatever you want to block.

Actually, the rule I posted yesterday should have already led you towards a solution as it clearly indicated which approach you can take to block such requests. So this whole “discussion” shouldn’t have been necessary.

I think you fail to understand that some people are new to things and not already well versed in Firewall rules from doing it for years. I cannot just magically know how I should adjust this rule as it is the first time I have ever had to configure one. Telling me to just change things does not help me as I do not know what to change to get my results. Maybe you do cause you have experience, but you shouldn’t assume everyone else does. Otherwise I wouldn’t be here asking for help. I have no idea what I should be doing to alter this rule and you are telling me how to do it in a roundabout way instead of directly telling me.