Blocking Referral SpamAt TheeDesign Studio, we’re seeing more and more spam referral traffic from websites that are compromising the integrity of our data. These websites are creating fake traffic using bots either accidentally while gathering data, or intentionally as free advertising for themselves. There are other methods used too, like darodar.com for example, who never even touches the server but simply spams the Google Analytics account. They are making the http requests directly to Google’s servers with random UA numbers. For now at least, most of these are using only the first view, -1, so I would suggest adding in an untouched account in your first view, and set filters and anything custom in view -2. This type of spam referral traffic is now being called Ghost Referrals. It is always a good idea to create an unfiltered view so you have all of your raw data still in tact.

As a best practice, you can and should exclude bots and spiders in your Google Analytics account. To do this, go into your Google Analytics Admin section. Under the View section, navigate to the views you use in the drop-down box, select View Settings, and find the box under Bot Filtering and check “Exclude all hits from known bots and spiders.”

Google Analytics Exclude Known Bots and Spiders

This won’t get rid of the main offenders such as semalt.com, buttons-for-website.com, darodar.com, or 7makemoneyonline.com, however we still recommend doing this. To combat the main offenders, you have a few options:

#1 .htaccess

In your .htaccess file, add the code below but update to include the offending site you are trying to block. The .htaccess file is processed before loading a page, and these lines of code are looking for the specific referrer (and yes, referrer used in the code below is the correct way to check the http header) in order to deny them from entering the website. Updated 6/16/2015

SetEnvIfNoCase Referer semalt.com spambot=yes
SetEnvIfNoCase Referer darodar.com spambot=yes
SetEnvIfNoCase Referer buttons-for-website.com spambot=yes
SetEnvIfNoCase Referer fbdownloader.com spambot=yes
SetEnvIfNoCase Referer descargar-musicas-gratis.com spambot=yes
SetEnvIfNoCase Referer baixar-musicas-gratis.comsavetubevideo.com spambot=yes
SetEnvIfNoCase Referer srecorder.com spambot=yes
SetEnvIfNoCase Referer kambasoft.com spambot=yes
SetEnvIfNoCase Referer ilovevitaly.com spambot=yes
SetEnvIfNoCase Referer ilovevitaly.co spambot=yes
SetEnvIfNoCase Referer ilovevitaly.ru spambot=yes
SetEnvIfNoCase Referer blackhatworth.com spambot=yes
SetEnvIfNoCase Referer priceg.com spambot=yes
SetEnvIfNoCase Referer backgroundpictures.net spambot=yes
SetEnvIfNoCase Referer embedle.com spambot=yes
SetEnvIfNoCase Referer extener.com spambot=yes
SetEnvIfNoCase Referer extener.org spambot=yes
SetEnvIfNoCase Referer fbfreegifts.com spambot=yes
SetEnvIfNoCase Referer feedouble.com spambot=yes
SetEnvIfNoCase Referer feedouble.net spambot=yes
SetEnvIfNoCase Referer japfm.com spambot=yes
SetEnvIfNoCase Referer joinandplay.me spambot=yes
SetEnvIfNoCase Referer joingames.org spambot=yes
SetEnvIfNoCase Referer iskalko.ru spambot=yes
SetEnvIfNoCase Referer musicprojectfoundation.com spambot=yes
SetEnvIfNoCase Referer myprintscreen.com spambot=yes
SetEnvIfNoCase Referer slftsdybbg.ru spambot=yes
SetEnvIfNoCase Referer edakgfvwql.ru spambot=yes
SetEnvIfNoCase Referer openfrost.com spambot=yes
SetEnvIfNoCase Referer openfrost.net spambot=yes
SetEnvIfNoCase Referer openmediasoft.com spambot=yes
SetEnvIfNoCase Referer serw.clicksor.com spambot=yes
SetEnvIfNoCase Referer socialseet.ru spambot=yes
SetEnvIfNoCase Referer sharebutton.net spambot=yes
SetEnvIfNoCase Referer cityadspix.com spambot=yes
SetEnvIfNoCase Referer screentoolkit.com spambot=yes
SetEnvIfNoCase Referer softomix.com spambot=yes
SetEnvIfNoCase Referer softomix.net spambot=yes
SetEnvIfNoCase Referer softomix.ru spambot=yes
SetEnvIfNoCase Referer gobongo.info spambot=yes
SetEnvIfNoCase Referer myftpupload.com spambot=yes
SetEnvIfNoCase Referer websocial.me spambot=yes
SetEnvIfNoCase Referer luxup.ru spambot=yes
SetEnvIfNoCase Referer ykecwqlixx.ru spambot=yes
SetEnvIfNoCase Referer soundfrost.org spambot=yes
SetEnvIfNoCase Referer seoexperimenty.ru spambot=yes
SetEnvIfNoCase Referer cenokos.ru spambot=yes
SetEnvIfNoCase Referer star61.de spambot=yes
SetEnvIfNoCase Referer superiends.org spambot=yes
SetEnvIfNoCase Referer vapmedia.org spambot=yes
SetEnvIfNoCase Referer econom.co spambot=yes
SetEnvIfNoCase Referer vodkoved.ru spambot=yes
SetEnvIfNoCase Referer adcash.com spambot=yes
SetEnvIfNoCase Referer videofrost.com spambot=yes
SetEnvIfNoCase Referer youtubedownload.org spambot=yes
SetEnvIfNoCase Referer zazagames.org spambot=yes
SetEnvIfNoCase Referer 7makemoneyonline.com spambot=yes
SetEnvIfNoCase Referer ranksonic.info spambot=yes
SetEnvIfNoCase Referer hulfingtonpost.com spambot=yes
SetEnvIfNoCase Referer viandpet.com spambot=yes
SetEnvIfNoCase Referer a-hau.mk spambot=yes
SetEnvIfNoCase Referer cfsrating.sonicwall.com:8080 spambot=yes
SetEnvIfNoCase Referer yougetsignal.com spambot=yes
SetEnvIfNoCase Referer cenoval.ru spambot=yes
SetEnvIfNoCase Referer bestwebsiteawards.com spambot=yes
SetEnvIfNoCase Referer bestwebsitesawards.com spambot=yes
SetEnvIfNoCase Referer simple-share-buttons.com spambot=yes
SetEnvIfNoCase Referer adviceforum.info spambot=yes
SetEnvIfNoCase Referer o-o-6-o-o.com spambot=yes
SetEnvIfNoCase Referer o-o-8-o-o.com spambot=yes
SetEnvIfNoCase Referer humanorightswatch.org spambot=yes
SetEnvIfNoCase Referer smailik.org spambot=yes
SetEnvIfNoCase Referer s.click.aliexpress.com spambot=yes
SetEnvIfNoCase Referer social-buttons.com spambot=yes
SetEnvIfNoCase Referer 4webmasters.org spambot=yes
SetEnvIfNoCase Referer best-seo-offer.com spambot=yes
SetEnvIfNoCase Referer best-seo-solution.com spambot=yes
SetEnvIfNoCase Referer buttons-for-your-website.com spambot=yes
SetEnvIfNoCase Referer www.Get-Free-Traffic-Now.com spambot=yes
SetEnvIfNoCase Referer free-share-buttons.co spambot=yes
SetEnvIfNoCase Referer theguardlan.com spambot=yes
SetEnvIfNoCase Referer googlsucks.com spambot=yes
SetEnvIfNoCase Referer buy-cheap-online.info spambot=yes
SetEnvIfNoCase Referer forum69.info spambot=yes
SetEnvIfNoCase Referer meendo-free-traffic.ga spambot=yes
SetEnvIfNoCase Referer www.kabbalah-red-bracelets.com spambot=yes
SetEnvIfNoCase Referer pornhub-forum.ga spambot=yes
SetEnvIfNoCase Referer pornhubforum.tk spambot=yes
SetEnvIfNoCase Referer anal-acrobats.hol.es spambot=yes
SetEnvIfNoCase Referer youporn-forum.ga spambot=yes
SetEnvIfNoCase Referer sexyteens.hol.es spambot=yes
SetEnvIfNoCase Referer amanda-porn.ga spambot=yes
SetEnvIfNoCase Referer generalporn.org spambot=yes
SetEnvIfNoCase Referer depositfiles-porn.ga spambot=yes
SetEnvIfNoCase Referer rapidgator-porn.ga spambot=yes
SetEnvIfNoCase Referer torture.ml spambot=yes
SetEnvIfNoCase Referer domination.ml spambot=yes
SetEnvIfNoCase Referer webmaster-traffic.com spambot=yes
SetEnvIfNoCase Referer youporn-forum.uni.me spambot=yes
SetEnvIfNoCase Referer www.event-tracking.com spambot=yes
SetEnvIfNoCase Referer free-share-buttons.com spambot=yes
SetEnvIfNoCase Referer free-social-buttons.com spambot=yes
SetEnvIfNoCase Referer guardlink.org spambot=yes
SetEnvIfNoCase Referer redtube-talk.ga spambot=yes
SetEnvIfNoCase Referer sanjosestartups.com spambot=yes
SetEnvIfNoCase Referer trafficmonetize.org spambot=yes
SetEnvIfNoCase Referer sitevaluation.org spambot=yes
SetEnvIfNoCase Referer 100dollars-seo.com spambot=yes
SetEnvIfNoCase Referer dailyrank.net spambot=yes
SetEnvIfNoCase Referer howtostopreferralspam.eu spambot=yes

Order allow,deny
Allow from all
Deny from env=spambot

*Note that this does not work for all referral spam traffic, such as darodar.com which doesn’t actually hit the server or the website. Any of the spammers who never actually hit the server, such as ghost referrers this method will not block.

#2 Javascript Referral Exclusion

In the Admin section of Google Analytics, under the Property section select .js Tracking Info which will display a few more options, select Referral Exclusion List. Hit +ADD REFERRAL EXCLUSION and enter each domain you wish to exclude. A drawback to this method is that you must be running Universal Analytics, analytics.js instead of ga.js.

Universal Analytics Javascript Referral Exclusion List

 

*Note that this method requires a lot of manual work to add each domain to the list, and it has a problem where referral traffic still shows as direct traffic at times.

#3 Google Analytics Filter By Site

The most consistent method for blocking is using filters. However sometimes you cannot use filters if you do not have proper permissions inside your Google Analytics account. In the Admin section of Google Analytics, under the View section, select Filters.

Google Analytics Filters Spam Referrals

Select +NEW Filter and assign a name for the filter. Under Filter Type, select Custom. Exclude should be selected by default, so select “Referral” or a better option might be “Campaign Source” in the Filter Field rather than what is shown in the picture. In the Filter Pattern box, type the domain of the offending referrer and Save. You can add multiple to the filter by separating them with a | but each filter has a 255 character limit. See below for the filters written this way to make things easier.

Setting Up Spam Referral Filter in Google Analytics

Popular Google Analytics Referral Spam List: Updated 5/19/2016

  • semalt.com
  • darodar.com
  • buttons-for-website.com
  • fbdownloader.com
  • descargar-musicas-gratis.com
  • baixar-musicas-gratis.comsavetubevideo.com
  • srecorder.com
  • kambasoft.com
  • ilovevitaly.com
  • ilovevitaly.co
  • ilovevitaly.ru
  • blackhatworth.com
  • priceg.com
  • backgroundpictures.net
  • embedle.com
  • extener.com
  • extener.org
  • fbfreegifts.com
  • feedouble.com
  • feedouble.net
  • japfm.com
  • joinandplay.me
  • joingames.org
  • iskalko.ru
  • musicprojectfoundation.com
  • myprintscreen.com
  • slftsdybbg.ru
  • edakgfvwql.ru
  • openfrost.com
  • openfrost.net
  • openmediasoft.com
  • serw.clicksor.com
  • socialseet.ru
  • sharebutton.net
  • cityadspix.com
  • screentoolkit.com
  • softomix.com
  • softomix.net
  • softomix.ru
  • gobongo.info
  • myftpupload.com
  • websocial.me
  • luxup.ru
  • ykecwqlixx.ru
  • soundfrost.org
  • seoexperimenty.ru
  • cenokos.ru
  • star61.de
  • superiends.org
  • vapmedia.org
  • econom.co
  • vodkoved.ru
  • adcash.com
  • videofrost.com
  • youtubedownload.org
  • zazagames.org
  • 7makemoneyonline.com
  • ranksonic.info
  • hulfingtonpost.com
  • viandpet.com
  • a-hau.mk
  • cfsrating.sonicwall.com:8080
  • yougetsignal.com
  • cenoval.ru
  • bestwebsiteawards.com
  • bestwebsitesawards.com
  • simple-share-buttons.com
  • adviceforum.info
  • o-o-6-o-o.com
  • o-o-8-o-o.com
  • humanorightswatch.org
  • smailik.org
  • s.click.aliexpress.com
  • social-buttons.com
  • 4webmasters.org
  • best-seo-offer.com
  • best-seo-solution.com
  • buttons-for-your-website.com
  • www.Get-Free-Traffic-Now.com
  • free-share-buttons.co
  • theguardlan.com
  • googlsucks.com
  • buy-cheap-online.info
  • forum69.info
  • meendo-free-traffic.ga
  • www.kabbalah-red-bracelets.com
  • pornhub-forum.ga
  • pornhubforum.tk
  • anal-acrobats.hol.es
  • youporn-forum.ga
  • sexyteens.hol.es
  • amanda-porn.ga
  • generalporn.org
  • depositfiles-porn.ga
  • rapidgator-porn.ga
  • torture.ml
  • domination.ml
  • webmaster-traffic.com
  • youporn-forum.uni.me
  • www.event-tracking.com
  • free-share-buttons.com
  • free-social-buttons.com
  • guardlink.org
  • redtube-talk.ga
  • sanjosestartups.com
  • trafficmonetize.org
  • sitevaluation.org
  • 100dollars-seo.com
  • dailyrank.net
  • howtostopreferralspam.eu
  • free-video-tool.com
  • keywords-monitoring-your-success.com

These are the filters we add. Remember that Google Analytics only allows 255 characters, so these have to be broken up into multiple different filters. Updated 6/16/2015

Filter 1

semalt.com|darodar.com|buttons-for-website.com|fbdownloader.com|descargar-musicas-gratis.com|baixar-musicas-gratis.comsavetubevideo.com|srecorder.com|kambasoft.com|ilovevitaly.com|ilovevitaly.co|ilovevitaly.ru|blackhatworth.com|priceg.com

Filter 2

backgroundpictures.net|embedle.com|extener.com|extener.org|fbfreegifts.com|feedouble.com|feedouble.net|japfm.com|joinandplay.me|joingames.org|iskalko.ru|musicprojectfoundation.com|myprintscreen.com|slftsdybbg.ru|edakgfvwql.ru|openfrost.com

Filter 3

openfrost.net|openmediasoft.com|serw.clicksor.com|socialseet.ru|sharebutton.net|cityadspix.com|screentoolkit.com|softomix.com|softomix.net|softomix.ru|gobongo.info|myftpupload.com|websocial.me|luxup.ru|ykecwqlixx.ru|soundfrost.org

Filter 4

seoexperimenty.ru|cenokos.ru|star61.de|superiends.org|vapmedia.org|econom.co|vodkoved.ru|adcash.com|videofrost.com|youtubedownload.org|zazagames.org|7makemoneyonline.com|ranksonic.info|hulfingtonpost.com|viandpet.com|a-hau.mk

Filter 5

cfsrating.sonicwall.com:8080|yougetsignal.com|cenoval.ru|bestwebsiteawards.com|bestwebsitesawards.com|simple-share-buttons.com|adviceforum.info|o-o-6-o-o.com|o-o-8-o-o.com|humanorightswatch.org|smailik.org|s.click.aliexpress.com

Filter 6

social-buttons.com|4webmasters.org|best-seo-offer.com|best-seo-solution.com|buttons-for-your-website.com|www.Get-Free-Traffic-Now.com|free-share-buttons.co|theguardlan.com|googlsucks.com|buy-cheap-online.info|forum69.info

Filter 7

meendo-free-traffic.ga|www.kabbalah-red-bracelets.com|pornhub-forum.ga|pornhubforum.tk|anal-acrobats.hol.es|youporn-forum.ga|sexyteens.hol.es|amanda-porn.ga|generalporn.org|depositfiles-porn.ga|rapidgator-porn.ga|torture.ml|domination.ml

Filter 8

webmaster-traffic.com|youporn-forum.uni.me|www.event-tracking.com|free-share-buttons.com|free-social-buttons.com|guardlink.org|redtube-talk.ga|sanjosestartups.com|trafficmonetize.org|sitevaluation.org|100dollars-seo.com|dailyrank.net

Filter 9

howtostopreferralspam.eu

#4 Country Level Google Analytics Referral Exclusion

We’re also experimenting with blocking entire countries where the referral traffic is coming from by going to Custom > Filter Field of Country, and adding the country name to the Pattern box such as Russia|China|Brazil|India|Indonesia. This has worked well for preventing many of these, although we have seen some now like simple-share-buttons.com, social-buttons.com, and 4webmasters.org that seem to come from multiple countries, perhaps through a proxy network or just changing the data they are sending to the Analytics servers. The fight continues.

Country Level Filter for Google Analytics Spam

*Note that I wouldn’t filter by country if you have legitimate traffic from other countries.

#5 Filter Based On Hostname

Most referral spammers that are classified as Ghost Referrals don’t actually know your website or hostname. This means that if you set a list of only valid hostnames, most of the referral spam should be filtered out. To find your valid hostnames, set a large time frame of 1+ years if you have that data and go to Audience > Network > Hostname Tab as seen in the screenshot below:

Finding Valid Hostnames in Google Analytics

Your valid hostnames will include things such as your domain, subdomains, Google translate, Google web cache, newsletters (assuming you have Analytics tracking,) your YouTube channel, the Wayback Machine, and anywhere else where you may have your Google Analytics tracking code such as shopping carts, offsite payment, etc. To make a filter for these, we will need to create a regular expression for each valid hostname, the easiest of which would be in the format domain.com|www.domain.com|translate.googleusercontent.com|webcache.googleusercontent.com etc etc with whatever hostnames you deem are valid, and then we need to add a filter. Make sure you change your filter pattern to include your valid hostnames. What this will leave us with is only websites that have our Google Analytics tracking ID installed.

Filter by Valid Hostnames Google Analytcs

*Note that this filter works well for most, but some referral spammers may use your domain name as their hostname, bypassing this filter. This is also an Include Filter and not Exclude like the others.

#6 Changing Your Analytics Code

A lot of the spam referrers target the homepage of the website, generally reported as / in Google Analytics. According to the documentation for Google Analytics, you can override a page value such as replacing / with /index.php by adding the following code to your Analytics Javascript:

ga('send', 'pageview', '/index.php');

All of your homepage traffic will now be reported as /index.php. The way this helps with referral spam is that we can setup 2 filters. The first will be to filter out any requests to the homepage recorded as /, because with the Javascript addition to the Google Analytics code, the only legitimate way the homepage will be reported is with /index.php.

Google Analytics Filter Homepage to Block Referral Spam

Of course we wouldn’t want a disconnect in our Google Analytics data and have all views of the homepage in the future recorded as /index.php where they have always been / in the past, so we add another filter to re-write the homepage as it’s recorded in Google Analytics back to /, but it will fire after the spam referral has been filtered out. This keeps our recorded data the same as in the past, but should eliminate some of the referral spam sources as well.

Google Analytics Filter To Rewrite Homepage

*Note that this method requires you to edit your Google Analytics code and relies on the referrer spam only sending traffic to your homepage with the uri of /.

Referral Spam Conclusion And Notes

There is no one perfect method to get rid of the spam at this time. Because of the variety of different types of spam and the different methods being used, you may need a few different methods implemented and even then some spam is likely to get through. If you need to see your historical data with the spam filtered out, you can create a custom segment in Google Analytics.

In April 2015, a lot of porn websites started spamming Google Analytics. I fear this fight will continue to get worse until Google finally cracks down.

In May 2015, another interesting spam referrer has appeared, www.event-tracking.com that is also adding itself as an “Event” in Google Analytics. See the image below.
Event Tracking Spam in Google Analytics

We’ve seen these spam referrals show as referral traffic, show in Organic Search keywords reports, show as viewed pages that don’t exist on the website, show up in event tracking, and even spam as direct traffic. If you need to find more ways to filter them, find some piece of information that the referrer forgot to set and create a filter to exclude all not set values for that piece of information.

Is your internet marketing company leaving these spam referrers in your reports month after month and compromising your data? Contact the SEO experts at TheeDesign Studio in Raleigh, NC at 919-341-8901 or schedule a consultation and we’ll help you keep your data accurate.