You are here

AWStats - ignore visits to your own sites

Keywords: 

Here's a handy tip for those viewing stats for their own sites and finding that their own IP addresses are skewing the results. It applies to AWStats and only if you have access to the configuration or can ask your hosting ISP to add this line - if you can't do that then consider a new hosting ISP; I can certainly recommend one or two!

If you have a fixed IP or range from your ISP, this is quite easy. Otherwise you could block the whole ISP ranges you're likely to use - but that runs the risk of then not recording many of the legitimate visits from other people on the same ISP as you.

The line to configure is SkipHosts. Here is an example:

SkipHosts="localhost 10.1.2.3 REGEX[^192\.168\.10\.2[0-7]$]"

You can list as many IPs here as you like, and also put in some powerful regular expression matchers. Above there are three elements:

localhost: if you have a cronjob on the machine hosting the site which accesses it (such as by wget or curl), add this. It doesn't hurt to anyway.

10.1.2.3: This is a single fixed IP that will now be blocked from the statistics.

192.168.10.20 to 192.168.10.27: this is the range of IPs blocked by the regular expression. It isn't possible to use CIDR notation, so you have to get creative like this.

If you get stuck, drop a comment in and I'll see if I can help!