Marketing With Miles Categories...
Block Your Own IP Address in Awstats
October 24, 2006

AwstatsIf you’re like me you look at your site several times a day, when I am designing I do 100 to 200 pageviews sometimes, this could really mess up my statistics in Awstats (standard statistics reporting in Cpanel). Well, there’s an easy way to block your IP address from being logged.

In your home directory of your website (this is the directory above public_html) you will see a file named awstats.yoursite.com.conf.

Download the file, open it, and find this part…

# 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=" "

Simply insert your IP address in between the quotes for SkipHosts then upload the file back to where it was. You will also need to CHMOD the file to 444 so your changes won’t be overwritten the next time your server updates.

That’s it! Now when you view your own site you won’t be screwing up the stats and will get a more accurate reporting of your pageviews. You can find your IP address by visiting this site.

I hope you enjoyed this post. Stay updated on future posts by subscribing to my RSS Feed.

Yours in success,
Miles Baker
Miles Baker
Bookmark
LinkLink to this page:


5 Comments on “Block Your Own IP Address in Awstats”

  1. Comment by Ron - November 6, 2006 @ 9:23 am

    Thank you for posting this!
    It seems like I’m always editing something and it messes up my stats bigtime. Now I can see my true stats without counting my own visits.

  2. Comment by Deccan Chronicle - November 30, 2006 @ 9:21 pm

    Good Idea.. I never though about blocking my own IP address… but it makes sense.

  3. Comment by Shaun - May 20, 2007 @ 6:17 am

    Yes, good idea. Thanks Miles.

  4. Comment by jp - June 17, 2007 @ 11:51 pm

    Thank you! I have been looking for a way to do this forever. You’d think they would update CPanel and add this option to it. I’ve seen countless others looking for a way to do this on the Internet.

  5. Comment by Silver - October 10, 2007 @ 4:28 am

    Thanks for posting this! I, too, was messing up my stats big time due to numerous edits. Looking forward to see a more accurate reflection of my visitors now. Cheers.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.