How to exclude an IP address from AWStats statistics
This article describes how to exclude an IP address from the site statistics that AWStats generates. For example, you may want to exclude your home IP address so your own site visits do not distort the statistics.
Excluding an IP address from AWStats
To exclude an IP address from AWStats, follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see this article
- In the Files section of the cPanel home screen, click File Manager.
- In the File Manager Directory Selection dialog box, click Home Directory, and then click .
- In the directory listing, double-click the tmp directory, and then double-click the awstats directory.
- Select the awstats.example.com.conf file, where example.com represents your domain name, and then click Edit.
- Locate the following line in the file:
Between the quotation marks, type the IP address that you want to exclude. To exclude multiple hosts, use a space between each value. For example, the following line shows how to exclude two IP addresses:
Existing AWStats statistics retain the excluded IP address. The SkipHosts setting only affects statistics generated from this point forward.
The configuration file is now ready. However, by default AWStats automatically overwrites the file every 24 hours. To prevent this from happening, you must modify the file permissions. To do this, follow these steps:
- In the cPanel File Manager, right-click the awstats.example.com.conf file, where example.com represents your domain name, and then click Change Permissions.
- In the User column, clear the Write check box. This changes the permissions to 444 (read access for everyone).
If you ever need to edit the file again, select the Write check box in the User column (to set permissions temporarily to 644), make your changes to the file, and then clear the Write check box.