Measures against referrer spam

Hi,

our site has about 200 to 300 daily visitors. Unfortunately, we get more and more referrer spam (http://en.wikipedia.org/wiki/Referrer_spam) with peaks of up to 350 fake visits, sometimes more, sometimes less.
This makes our statistics almost unusable (we do not publish our stats. Nonetheless, internal “reading” of the webstats is now a pain in the heck due to this many false data).

It is only a few websites who do this at our site (about halve a dozen). Are there any possible measures to exclude these fake visits from the statistics? I think, a referrer spam blacklist would be fine. However, such feature does not seem to be available?

kind regards,
Jens

You can block these kind of spam with a blacklist using a RewriteCond in .htaccess.

For example:

RewriteCond %{HTTP_REFERER} ^http://.(porn|casino|cialis) [NC]
RewriteRule .
%{HTTP_REFERER} [R,L]

If the referrer has “porn”, “casino” or “cialis” inside, it will be redirected back to the referrer :slight_smile:

[quote=macringo]
You can block these kind of spam with a blacklist using a RewriteCond in .htaccess.

For example:

RewriteCond %{HTTP_REFERER} ^http://.(porn|casino|cialis) [NC]
RewriteRule .
%{HTTP_REFERER} [R,L]

If the referrer has “porn”, “casino” or “cialis” inside, it will be redirected back to the referrer :-)[/quote]

I do not have shell access to the website itself (www.ourwebsite.org), but only to our piwik server and installation (piwik.ourwebsite.org). So, unfortunately, what you suggest is not possible for me.

Maybe I should submit a feature request for having a black list (maybe a regex list) for referrer spam sites, which is simply ignored (not counted at all) by piwik?! Similar to the IP blacklist.

sure. create a ticket.

Hmm, I’ve never heard of referrer spam that actually loads a page (piwik only reads a hit when the javascript is loaded). Referrer spam usually just involves pinging the page, so any php scripts or internal logs such as webalizer will read a hit, but piwik, google analytics, etc. shouldn’t register that. I have a few sites that get about 2000 unique visits / day on webalizer, but about 20 on piwik, so I’m pretty happy with piwik’s ability to filter out the trash - are you sure you’re not getting picked on by a crawler or disgruntled competitor?

please create a ticket, post your full Referrer (found in log_visit) that you think are referrer spam.

The ticket is at: Implement a default Referrer spam blacklist · Issue #2268 · matomo-org/matomo · GitHub

if you have problems, please post a comment there

Definately seeing more of these fake referrers in the logs these days.

I’ve implemented Referrer Spam blacklist in Piwik! please contribute any new spamming domain in the ticket : Implement a default Referrer spam blacklist · Issue #2268 · matomo-org/matomo · GitHub

thank
google
google
http://www.google.co.th/

Let’s continue the discussion about Referrer spam here