Firewall Rules (Allow Google Traffic) [HELP!]

I can’t seem to figure out how to set up the Cloudflare firewall to only allow traffic from Google searches and from Google Ad traffic.

What I set up was “Referer | Does Not Contain | google” and that doesn’t seem to work properly.

Let me know what you’ve come up with!

99% of my traffic is direct DDoS traffic, so I just want to stop it all with a challenge and only directly allow people from Google search & ads.

If your traffic is mostly DDoS, why not create a Firewall rule based on Threat Score? Firewall Rules FAQ · Cloudflare Firewall Rules docs

About 99% of my legitimate traffic is from google or google ads. I feel like the thread score won’t take away all the false traffic. But I’m not sure.

On the flip side, if you did only allowed refereed traffic, wouldn’t that exclude those who revisit via bookmark.or manually typing in the URL?

That is correct. I just don’t know the right rule.

If not worried about returning visitors, (http.referer ne “.google.com”) should work. Don’t forget Google’s other domains such as ccTLD’s, adwords adsense etc.

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