How to exclude your IP address from AWStats statistics
  John Mwaniki /   29 Sep 2021

How to exclude your IP address from AWStats statistics

Website owners have a goal of seeing their sites get as much traffic (visitors) as possible.

They are always eager and curious to know how much traffic their websites are getting daily. In an earlier article, I wrote about how to check website traffic in cPanel using Awstats web analytics tool.

They also happen to be the most frequent visitors to their websites. They do so to ensure the site is up and running, the content is correct and up-to-date, and that all the website features and functionalities are working as they should.

Without their knowledge, their visits are recorded by the webserver and displayed among other traffic statistics in AWStats.

If they and their close allies such as family members, friends, employees, and colleagues regularly visit the site, these statistics may rise to good numbers and deceive them that their websites are receiving a lot of traffic whereas it's just themselves.

I am sure, as a website owner, you would wish to see the genuine stats for your website from real visitors. Stats that exclude visits from you and the people close to you.

In this article, I will take you through a step-by-step process of configuring Awstats to exclude your IP address from the website visits statistics.

How to check your IP address

You need to first know which IP address(es) to exclude from getting recorded in AWstats. To do this, visit ping.eu and you will see your IP address displayed. There are many other sites you can check using. You can as well ask your Internet Service Provider (ISP) to check it for you if you have an office or home Internet installed.

IP address checkup with ping.eu

How to exclude/filter out your IP address from AWstats statistics

Step 1: Log in to your cPanel account

Step 2: Click on the "File Manager" under the "Files" section

cPanel File Manager

Step 3: Navigate to and open the "tmp" folder of the File Manager

cPanel File Manager tmp directory

Step 4: Open the "awstats" folder

cPanel File Manager awstats directory

Step 5: Open the file named "awstats.yourdomain.conf" by right-clicking on it, and selecting "Edit".

cPanel File Manager Awstats configuration file
If your website has SSL installed and people access it through HTTPS, open the "ssl" folder and open its "awstats.yourdomain.conf" instead.

Step 6: Search for the line below:

SkipHosts=""

AWstats config file Skiphosts

Add the IP address you want to exclude from the traffic statistics in between the quotes " ". If you want to exclude more than one IP address, simply separate them with a space in between them for example.

SkipHosts="192.168.1.214 10.125.21.152"

Step 7: Click on the "Save Changes" button at the top-right corner of the editor.

Saving changes to Awstats config file

cPanel overwrites the "awstats.yourdomain.conf" file settings to default every 24hrs. So your changes configurations won't work after a day.

Luckily, there is a way out. You just need to change the file permission for the configuration file to 444, to deny the cPanel from rewriting the file. To do this, simply click on the permission value on the "Permission" column of the table and replace the value with "0444".

Awstats config file permission

If you ever need to edit the config file again, you will need first to set permissions temporarily to 644, make your changes to the file, and then change it back to 444 to prevent it from being overwritten.

That's all!

Your earlier visits will still remain as they are, but new ones won't be recorded as long as you use the email you just blocked/excluded.

Conclusion

Having as much traffic(visitors) as the site can is the dream of every website owner.

The website owners are always curious to know how many visitors their websites receive over a given period of time. They also frequent visiting their websites to ensure that everything is in order.

Their visits and those of people close to them add up to the overall website traffic and may deceive them into thinking they have a lot of traffic while that is not the case.

In this article, you have learned through a step-by-step procedure, how as a website owner you can exclude/block your IP address, or those of people close to you from being recorded and shown in the traffic statistics of AWstats in cPanel.