How to remove AWStats info of a domain or subdomain in cPanel
In this article, you will learn how to remove the AWStats information for a domain or subdomain that you have deleted in cPanel.
AWStats is an open-source Web analytics reporting tool that comes packaged with cPanel, suitable for analyzing data from Internet services such as web, streaming media, mail, and FTP servers. It works by converting the log files from the webserver into usable statistics.
As your web hosting account ages, there are high chances that you will create some subdomains or even register other domains under the same account. AWStats will generate an extra record with the new domain/subdomain traffic statistics. It also by default creates two versions of statistics for each of the domain/subdomain; one HTTP and the other HTTPS version.
Below is an AWStats screenshot of this domain and a subdomain, each with two different entries.
After you delete some of these domains or subdomains, their AWStats information will continue being displayed. Over time, the number of these old deleted domains or subdomains may pile up and make it hard to easily spot the domain whose stats you want to check.
Below is a guide on the steps required to remove these domains AWStats from your cPanel interface.
How to remove AWStats information of a domain/subdomain
Step 1: Log in to the hosting cPanel account.
Step 2: Open "File Manager" under the Files section
Step 3: Open the "tmp" folder
Step 4: Open the "awstats" folder
You will see an AWStats configuration file for each domain or subdomain with a name similar to: "awstats.yourdomain.conf" or "awstats.subdomain.yourdomain.conf".
Step 5: Delete those whose information you want to remove from AWStats statistics by right-clicking on the file, then selecting the "Delete" option on the popup that appears.
If an SSL certificate is installed on your website, you will see a folder named "SSL". Open it and in the same way delete the configuration files whose information you don't want to see in AWStats.
In my case, all the website traffic has been redirected to the HTTPS version of the website. Also, the "example.webdevsplanet.com" was deleted a while back. I'm not interested in either of the subdomain versions or the non-secure version of the domain "webdevsplanet.com". Therefore, I will delete all the configuration files and retain only the "awstats.webdevsplanet.com.conf" that is within the "SSL" folder.
Now refresh the AWStats page. The information for the domains you just deleted will no longer be listed.
Note: It is important to store a backup of the "awstats" folder before deleting any file to have a restore point just in case you make a mistake and delete the wrong files.