如何使用.htaccess阻止Digital Ocean Inc. Google Analytics直接流量 [英] How to block Digital Ocean Inc. Google Analytics Direct Traffic using .htaccess

查看:166
本文介绍了如何使用.htaccess阻止Digital Ocean Inc. Google Analytics直接流量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解释:我浏览了Google Analytics并注意到,由于新的访问次数100%跳出率和0秒页面,因此我每天都会从Digital Ocean Inc.多次接收直接流量(大约24次)持续时间。进一步的研究表明,它只是一个云服务,但我也发现了列入黑名单的IP列表


Explanation: I have gone through my Google Analytics and noticed I am receiving direct traffic from Digital Ocean Inc. multiple times a day (around 24) as new visits 100% bounce rate and 0 second page duration. Further research shows that its just a cloud service but I also found a list of blacklisted IP's here and multiple other people reporting the same traffic.

Question: Since I have this range of IP's that may or may not be my problem would I be able to block these IP's from accessing my site using my .htaccess file? Is there a better method other than just filtering out the traffic using a Google analytics filter?

IP's Listed by website for Digital Ocean Inc: 198.211.96.0 - 198.211.127.255

解决方案

I noticed the same issue on my recent launch... How I plan on fixing it is blocking the ISP Provider instead of IP address.

also im adding to my .htaccess

  #get rid of the bad bot
   RewriteEngine on
   RewriteCond %{HTTP_USER_AGENT} ^DigitalOceanInc.
   RewriteRule ^(.*)$ http://go.away/

这篇关于如何使用.htaccess阻止Digital Ocean Inc. Google Analytics直接流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆