@dangayle

It's about me, Dan Gayle, and my dog. Except, there is no dog.

How to block your IP from Awstats

Although Google Analytics is great, for the price AMAZING, sometimes you want to look at your site numbers a little differently. That’s why I like looking at my Awstats from time to time to get into the nitty-gritty.

One problem though, when you realize that it doesn’t exclude YOUR visits from the logs. (Wow! There are a lot of Macintosh users with Firefox in the Spokane vicinity looking at my blog! I must be popular!)

To exclude your IP or host from the stats analyzer, locate the following file on your server, and open it with your text editor of choice:

/tmp/awstats/awstats.DOMAIN.conf

Locate this section in the .conf file:

# Do not include access from clients that match following criteria.
# If your log file contains IP adresses in host field, you must put here
# matching IP adresses criteria.
# If DNS lookup is already done in your log file, you must put here hostname
# criteria.
# Note: Use space between each value.
# Example: "127.0.0.1 163.84. 201.101.51.1"
# Example: "localhost abcxyz"
# Default: ""
#
SkipHosts="YOUR IP AND ANY OTHER YOU WANT TO EXCLUDE"

Within the SkipHosts="YOUR IP AND ANY OTHER YOU WANT TO EXCLUDE" section, enter the IP address of your network connection, and hit save.

Voilá! You are now skipped from your stats. Apparently, this doesn’t work retroactively, so you should see your stats changes from this point on.

Recent Youtube Favorites