How to exclude my own IP address from visitor metrics

Avatar
  • updated
  • Answered

Hi there. How do I exclude my own IP address from the visitor metrics or AW stats?  I want to make sure the numbers don't count all the times I visit my website directly or click on links to it from searches.

Avatar
IMH Support Agent 2
  • Answered

Helly Sydne,


Thanks for the question about excluding an IP address from the visitor metrics. You can filter IPs in the Who > Hosts > Full list page in AWStats. After accessing AWStats in cPanel, click on your domain name. On the next page (Statistics for:...) on the left side of the page, click on the Full list link (under Hosts). In the Exclude filter field type in your IP address to exclude it from the stats you are viewing. Please note, this is not a permanent filter and you will need to put in your IP each time you view this page. You can also add your IP to the SkipHosts parameter in your AWStats configuration file. This would need to be updated if and when your IP address changes.


The configuration file can be found in tmp/awstats directory inside of your home directory in the cPanel File Manager. The name of the configuration file will be something similar to:

awstats.YourDomain.com.conf

  1. Open this file for editing and look for the line that begins with:


    SkipHosts=""

  2. Insert your IP address between the quotes. If you would like to exclude a range of IP addresses, use a regular expression similar to this:


    SkipHosts="REGEX[^123\.456\.]"


    This would exclude all IPs of the block 123.456 (123.456.*.* where * equals all possible numbers for that part of an IP address)

  3. Once you have finished editing that file, click the Save Changes and then Close.

  4. To keep AWStats from overwriting your changes every 24 hours, you will want to change the file permissions of the configuration file you just edited to 444. If you need to make a change to the file in the future, you will need to change the permissions back to at least 644 until you are through editing the file.


Hope that helps!


If you have any further questions or comments, please let us know.


Kindest regards,

Arnel C.