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:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. Open the File Manager:
    • If you are using the Jupiter theme, on the Tools page, in the Files section, click File Manager:

      cPanel - File Manager icon (Jupiter theme)

    • If you are using the Paper Lantern theme, in the FILES section of the cPanel home page, click File Manager:

      cPanel - File Manager icon

  3. In the directory listing in the left-hand pane, double-click the tmp directory, and 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:

    SkipHosts=""
  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 example, the following line shows how to exclude two IP addresses:

    SkipHosts="192.168.1.214 10.125.21.152"
    
  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, 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. 
Get AWStats Hosting

Article Details

  • Product: All managed hosting accounts
  • Level: Intermediate

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.