Block Your Referral Spam in Google Analytics

This tool lets you automatically create and block referral spam filters to your Google Analytics profiles. To create and link these filters, you will need EDIT access in the Google Analytics accounts you want to modify. This tool will only allow you to access privileged accounts. (note that any existing filters with the names Spam-Filter_#N will be updated if there is a mismatch).


Get started by clicking the big, blue button below. You will be asked to authorise this tool to access your Google Analytics data. After doing so, you will be presented with options for filter creation.


What is a referrer?

A referrer is a simple HTTP header that's passed along when a browser goes from one page to another page, normally used to indicate where a user's coming from. But users can change it, and some people will set referrer at pages they want to promote and visit tons of people around the web -- people see it and say 'Oh, I should check it out'.

It's not necessarily a link… there are some people who try to drive traffic by visiting a ton of websites with an automated script and setting the referrer to be the URL they want to promote... there's no 'authentication'… You can’t automatically assume that it was the owner of the URL if you see something showing up in your dashboard. Somebody is trying to do some hijinx.

Matt Cutts, Head of Google Webspam Team

How does referrer spam work?

Many people assume that since a session is registered in Google Analytics that means somebody – a person, or a software robot, visited their site and that visit was picked up by GA. They would be wrong. Google Analytics relies on the client’s browser to execute a certain piece of JavaScript that makes an HTTP request to the Google Analytics servers, which then register a hit on the website and sets up a cookie on the user’s browser. However, the HTTP request can be sent by any device connected to the internet and if it contains all requisites it will still register a hit with Google Analytics.

.htaccess

You can copy and paste the following code into your .htaccess file, assuming you’re on an Apache server.

I like this method better than just blocking the domain in analytics because it prevents spam bots from hitting your server altogether.


RewriteEngine on
RewriteCond %{HTTP_REFERER} \*100dollars\-seo\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*4webmasters\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*76brighton\.co\.uk [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*7makemoneyonline\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*acads\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*adcash\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*adviceforum\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*anal\-acrobats\.hol\.es [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*anticrawler\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*axisalternativementalhealthsharebutton\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*baixar\-musicas\-gratis\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*best\-seo\-offer\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*best\-seo\-solution\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*bestwebsitesawards\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*blackhatworth\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*brakehawk\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buttons\-for\-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buttons\-for\-your\-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buy\-cheap\-online\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buy\-forum\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cenokos\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cenoval\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*chinese\-amezon\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cityadspix\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cyprusbuyproperties\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*dailyrank\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*darodar\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*depositfiles\-porn\.ga [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*descargar\-musica\-gratis\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*e\-buyeasy\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*econom\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*edakgfvwql\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*eredijovon\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*erot\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*europages\.com\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*event\-tracking\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*fbdownloader\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*floating\-share\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*forum20\.smailik\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*forum69\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*free\-floating\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*free\-share\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*free\-social\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*generalporn\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*get\-free\-social\-traffic\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*get\-free\-traffic\-now\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*getprismatic\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*gobongo\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*googlsucks\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*guardlink\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*hongfanji\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*how\-to\-earn\-quick\-money\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*hulfingtonpost\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*humanorightswatch\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*iloveitaly\.ro [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ilovevitaly\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ilovevitaly\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ilovevitaly\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*iminent\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*inboxdollars\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*iskalko\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*kabbalah\-red\-bracelets\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*kambasoft\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*lomb\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*lombia\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*lombia\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*lumb\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*luxup\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*makemoneyonline\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*masterseek\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*meendo\-free\-traffic\.ga [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*mpftpupload\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*myftpupload\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*nextconseil\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*o\-o\-6\-o\-o\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*o\-o\-8\-o\-o\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*o\-o\-8\-o\-o\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ok\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*paparazzistudios\.com\.au [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*pornhub\-forum\.ga [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*pornhub\-forum\.uni\.me [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*powitania\.pl [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*priceg\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*prlog\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*prodvigator\.ua [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*qualitymarketzone\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ranksonic\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ranksonic\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*rapidgator\-porn\.ga [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*resellerclub\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*savetubevideo\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*savetubevideo\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*screentoolkit\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*see\-your\-website\-here\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*semalt\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*semalt\.semalt\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*semaltmedia\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*seo\-platform\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*seoexperimenty\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*sexyali\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*sexyteens\.hol\.es [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*sharebutton\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*sharebutton\.to [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*sharemyfile\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*simple\-share\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*slftsdybbg\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*smailik\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*social\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*socialseet\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*srecorder\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*success\-seo\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*superiends\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*tasteidea\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*theguardlan\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*torontoplumbinggroup\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*torture\.ml [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*traffic2money\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*trafficmonetize\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*trafficmonetizer\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*video\-\-production\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*videos\-for\-your\-business\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*vodkoved\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*webmaster\-traffic\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*webmonetizer\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*website\-errors\-scanner\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*websocial\.me [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ykecwqlixx\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*youporn\-forum\.ga [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*youporn\-forum\.uni\.me [NC]
RewriteRule ^(.*)$ – [F,L]