My website get traffic from Facebook. Since last week, I did notice a lot of “Direct” traffic on my Google Analytics board, up to 200 users at the same time.
I did setup a Firewall Rules to allow only traffic from Facebook, and block all others sources.
So the rule is : (not http.referer contains “facebook”) then Block
It’s working, but all users get a page without any css organisation, because user agent stylesheet overrides my css.
The question here is how to fixe this?
Is there any better way to block this Direct traffic ??
So, you have the “Not” facebook referer blocked. You may have to add a first rule that will “allow” all necessary file extensions, like css, js, jpg, png, etc.
The problem is not that anything is overridden, but rather that you block all requests which are not originating from Facebook, which includes requests with a referrer from your very own site. You should add an and’ed second not contains with your own domain name. Still, this will block legitimate requests with empty referrers as well.
Generally, referrer blocks are never a good idea unless one knows exactly what they are doing.