Filtering HTTP referrer spam in AWStats with compound filters
Like a lot of bloggers, I enjoy finding out who’s linking to me and what kind of traffic I’m getting from them. AWStats is a great tool for this purpose. It’s very common, though, for the useful information in the statistics to be overwhelmed with fake results, such as HTTP referrer spam that makes it look like the spamming site is linking to you when what’s really going on is that it’s just bait to get YOU to visit THEM.
If you’re having that problem in AWStats, find this line:
Links from an external page (other web sites except search engines) - Full list
Click on the link marked “Full list”.
Now, you might already be aware that this Full results page for the listing of referring links has options for filtering in an affirmative sense or filtering to exclude. How that helps is when you realize that most referrer spam is for URLs that contain spam keywords in the first place, because that’s part of the spammers blackhat SEO strategy. Using an exclude filter of “poker” in that AWStats page, for example, I can take out a lot of spam URLs that would otherwise show up and get in the way of figuring out who’s really linking to me.
Just using any one filter word doesn’t cut it when you’re getting incoming tsunamis of referrer spam, though. There is a solution, fortunately. You can use the pipe symbol, shown in between brackets here [ | ] to build compound filters. It’s treated as a logical “OR”. So, to filter most of the spam out of my referring web site listings in AWStats, I just went about adding one exclude filter term after another, seperating them with pipes and re-filtering the report until almost all of the spam was gone. The result of the compound filter “poker|pill” would be to remove anything with EITHER the word “poker” OR the word “pill” in the URL.
Below is my compound exclude filter for AWStats referrer listings. You may find it a useful headstart in your own anti-spam strategy.
pharm|gener|weigh|casino|pill|poker|diet|blackjack|roulette|doctor|ruleta|stud|texashold|omahah
Now pity those who can’t filter out “cialis” because they want to discuss “socialism” (hat tip to Chuck for pointing that last one out to me).
Share This








