Awstats is widely recognized as the best free log analyzer but if your web host doesn't offer it you can still use it at your home computer. You will also benefit from installing Awstats at home if your web hosts offers Awstats because you can then modify the Awstats configuration file as you like. And that opens up quite a few options for improving the information you can extract from your logfile. This involves some heavy operations that are not suitable in a shared hosting environment so most web hosts have wisely disabled them.

Assuming you already have a typical development environment at home (including Apache and Perl) the installation of Awstats is quite straight forward. Go to the Awstats website, download the latest version and follow the supplied installation instructions.

And now, the benefits :

  1. Instant updates :

    By setting AllowToUpdateStatsFromBrowser to 1 you can instantly update your statistics with information from your freshest logfile.

  2. Ignore your own visits :

    Most ISP's supply dynamic IP adresses to their customers within a limited range. If your IP is in the range 123.456.* set the SkipHosts parameter to "REGEX[^123\.456\.]" and your own visits will not be counted.

  3. Ignore hits on rss files:

    RSS hits are mostly from robots and since RSS files are checked automatically quite often you should filter them out. Some modern web browsers also include RSS functionality so hits on RSS files can skew your browser statistics quite a bit.

    There are two configuration options useful for this. First the SkipFiles directive. If your RSS feed is located in the file rss.xml at the root of your website just set it to "/rss.xml".

    The other option is adjusting NotPageList. If the file suffix of your rss feed(s) is not used by any files that should be counted in your visitor stats just add it to the list. F.ex. if you use the .rss suffix.

  4. Counting url's with query string as unique pages :

    This is sometimes enabled, sometimes not in a shared hosting environment. With your own Awstats installation, just modify URLWithQuery. 1 for counting them as unique, 0 for not.

  5. View statistics for a whole year :

    Useful for examining long term trends in your traffic and available to you by setting AllowFullYearView to 3.

And here are some example configuration options that corresponds to the examples above.

AllowToUpdateStatsFromBrowser=1
SkipHosts="REGEX[^123\.456\.]"
SkipFiles="/rss.xml"
NotPageList="css js gif jpg jpeg png ico rss"
URLWithQuery=1
AllowFullYearView=3

As you might have noticed, regular expressions are necessary to maximize your configuration options. There is a good regular expressions tutorial at Zvon.org for those who want to learn about that.