Skip to content

Excluding an IP address from AWStats

AWStats is a web analytics tool that tracks visitor statistics for your site. Sometimes you may want to exclude specific IP addresses (like your own office or home IP) so that internal visits don’t distort your traffic data.

  • Prevents inflated visitor counts from your own activity.
  • Ensures accurate analytics for real external users.
  • Useful for excluding bots or internal testing environments.
  1. Log in to cPanel.

  2. On the Tools page → Files section, click File Manager.

  3. Navigate to:

    /tmp/awstats/
  4. Locate the configuration file for your domain:

    awstats.example.com.conf

    (Replace example.com with your actual domain.)

  5. Select the file → click Edit.

  6. Find the line:

    SkipHosts=""
  7. Between the quotation marks, type the IP address you want to exclude.

    • Example for multiple IPs:

      SkipHosts="192.168.1.214 10.125.21.152"
  8. Click Save Changes.

  • The SkipHosts setting only affects future statistics. Past logs will still include the excluded IPs.

  • By default, AWStats overwrites the configuration file every 24 hours. To prevent this:

    1. In File Manager, right‑click the configuration file.
    2. Click Change Permissions.
    3. Clear the Write checkbox in the User column.
    4. This sets permissions to 444 (read‑only).
  • If you need to edit the file again later, temporarily set permissions back to 644, make changes, then reset to 444.