AWStats Remove Unwanted Stats and Domains

Our site remains ad-free thanks to our affiliates. This post's featured affiliate is Linode. Simplify your infrastructure with Linode's cloud computing and hosting solutions. New users get $100 in free credit.

The post is not sponsored by the above affiliate and the content here is not representative of their company.

AWStats which comes packaged with CPanel is an Apache and other log parser to convert the log files from the web server into usable statistics. The reason AWStats is better than some “Real Time” stat systems is that the “Real Time Stat Systems” require JavaScript and often people can opt-out of them so they won’t appear in the stats. For instance, Google Analytics allows users to opt-out of being tracked. Or if the visitor doesn’t have JavaScript enabled, visitor won’t be tracked. Although Google Analytics has those “problems” it’s still useful, but we are here for AWStats.

If you have had your hosting account for a while, and start to notice a huge amount of old domains or subdomains that keep appearing when you try to get into your stats, you can remove them. Not through CPanel, but through your FTP Client, and I am going to explain how.

Removing Unwanted Domains from AWStats

  1. Verify what domains you want to remove by opening up CPanel and going to AWStats.
  2. Open your FTP Client and connect to your web server.
  3. Navigate to “/tmp/awstats/”, this may vary slightly on different hosts, so you may have to dig a little bit through some folders.
  4. (Optional) Save the AWStats folder to your computer just incase you delete the wrong files.
  5. Start deleting files in the format of awstats.[SUB].[DOMAIN].[TLD].conf, for instance, if your domain is “testing.geekthis.net”, you would look for and delete “awstats.testing.geekthis.net.conf”
  6. Reload your CPanel AWStats page to see those sites now gone.

Removing Unwanted Months of Stats from AWStats

  1. Using the above steps, go all the way up until 5, this is where we can now get started.
  2. Delete files in the format of awstats[MONTH][YEAR].[SUB].[DOMAIN].[TLD].txt that you no longer want. For instance, deleting April 2013 stats from geekthis.net, I would delete “awstats042013.geekthis.net.txt”
  3. Repeat this until all the stats you no longer want are deleted.

Related Posts

How to Train SpamAssassin

Learn about the different methods used to train SpamAssassin, along with initial spam data sources to use with SpamAssassin. Update your bayes database easily with existing data.

SpamAssassin SA-Update Tool

Learn what SpamAssassin's sa-update tool does, how it works, and if you should keep it running and modifying the configuration files on your server.

Incremental MySQL Backup with Binary Log

Learn how to properly perform an incremental MySQL backup using binary logs without having a gap between backups and overall improve the speed of database backups.

Website Admin Panel on Private Network

Split your website into two parts, administrative and public access. This post talks a little about having your website's control panel on your private network as apposed to publicly available.