Are you looking for Awstats exclude IP option?
Webmasters often need to exclude home IP address from the website statistics. This gives a more accurate report about the site visitors.
Fortunately, there are multiple ways to exclude certain IP addresses and websites from logging into AWStats. And, this depends more on the type of website, server, etc.
At Bobcares, we often receive requests to exclude IP addresses as part of our Server Management Services.
Today, let’s see how our Support Engineers exclude IP from logging into Awstats for our customers.
Why AWStats exclude IP addresses?
As we all know, Advanced Web Statistics or AWStats is a popular log analyzer.
cPanel servers use them to analyze website traffic summary. We can analyze many factors like the number of visits, pages, hits, Bandwidth, etc.
Sometimes, website owners may need to avoid entries related to their home IP address in site statistics. So, we attempt to exclude such IP’s from logging into AWStats. As a result, the website statistics will contain the details of only the actual website visitors.
How do we exclude IP addresses??
Recently, one of our customers approached us to restrict some IP’s from accessing AWStats. He doesn’t want his IP address logged in AWStats.
And, we can exclude them either via cPanel or from the terminal.
Let’s now check how our Support Engineers do it quickly.
1. Via cPanel
So, to exclude an IP address from AWStats, we follow the below steps:
- Firstly, we log in to the cPanel.
- Then, we click on the File Manager in the Files section.
- After that, we click on Home Directory>>Go.
- Next, from the directory listing, we choose tmp>>awstats.
- Then, we choose the configuration file for the domain. For instance, awstats.domain.com.conf, where domain.com represents the domain name.
- Edit the conf file and locate the line SkipHosts=” “.
- So, in between the quotation marks, we then type the IP address which we want to exclude. To exclude more than multiple hosts, use a space between each of them.
- Finally, we click on Save changes.
In this way, we can exclude the required IP’s from AWStats.
2. From terminal
Similarly, we can disable IP addresses from the backend. For that, we need to edit the AWStats configuration file present in the /home/user/tmp/awstats.
Then, we follow similar steps like editing the SkipHosts line and add the required IP address there.
Sometimes, users may use sub hosts for the network and not sure about the IP addresses. In such cases, we need to enable the DNS lookup feature in the AWStats configuration file.
Changing permissions
By default, AWStats automatically overwrites the configuration file every 24 hours. So, to prevent this, it is important to modify the configuration file permissions in both the above-mentioned methods.
For that, we choose the configuration file for the domain and click on Change File permissions.
Then, in the User column, we clear the Write checkbox and change the permissions to 444.
[Need help to exclude IP addresses in Awstats?- We’re available 24/7.]
Conclusion
In short, AWStats exclude IP option provides more accurate details about the website visitors. In today’s write-up, we saw how our Support Engineers set up Awstats for our customers.
0 Comments