This article describes the way to exclude an IP address from the site statistics that AWStats generates. For instance, you might want to exclude your home IP address so your own site visits don’t distort the statistics.
Excluding an IP address from AWStats
To exclude an IP address from AWStats, follow these steps:
1. Log in to cPanel.
2. In the Files section of the cPanel home screen, click File Manager.
3. In the directory listing in the left-hand pane, double-click the tmp directory, then double-click the AWStats directory.
4. Select the awstats.example.com.conf file, where example.com represents your domain name, and then click Edit.
5. Locate the following line in the file:
6. Between the quotation marks, type the IP address that you want to exclude. To exclude multiple hosts, use a space between each value. For instance, the following line shows the way to exclude two IP addresses:
7. Click Save Changes.
"Existing AWStats statistics retain the excluded IP address. The SkipHosts setting only affects statistics generated from this point forward."
8. 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).
- Click Change Permissions.
"If you ever need to edit the file again, choose the Write check box in the User column (to set permissions temporarily to 644), make your changes to the file, then clear the Write check box."