Killing False Hopes by Fending Off Referrer Spam

Referrer Spam

This website is admittedly not even a tiny blip on the blogging radar (or at least not yet), but I’ve been finding ways to get there somehow. Perhaps being able to post daily content is the best solution to my current problems, but I’ve also encountered another problem recently that’s quite annoying on its own. It’s not bad enough that the website is trying to get more views, but also that the views from real people and not from referrer spam. The latter has become quite a pain in the neck for many websites lately, especially for the smaller ones like this one.

NOTE: This is both a blog on my experience with referrer spam and a quick guide on how to remove it from one’s analytics (or at least the prescribed method). I hope it helps those who are also in this online struggle. Also take note that the following is mostly for websites with their own domain names and/or web hosting.

If any information in this article is incorrect, please leave a comment or message with the necessary corrections and other concerns. Thank you.

Taking This Web Thing More Seriously

First of all, here’s a bit of background. I started dabbling with blogging back in 2008, when I was just starting out with freelance writing. A college classmate of mine had been doing the same, and she was earning a bit of money with blog advertising. I was intrigued by the prospect of earning from one’s own website, so I followed suit and experimented.

Back then, the landscape wasn’t as hectic as it is now, so it was easier to earn by haplessly making blog posts on a regular basis. Since I was obsessed with martial arts at that time, I ran a martial arts blog on Blogger for a while, which somehow achieved a Google PageRank of 3 within the year. Things aren’t as easy these days, which is why I still beat myself up for not keeping it up after that year.

That was also when I applied for a Google AdSense account and thought I could game the system. Sadly, Google was wise to it and deactivated it once I got to around the $26 mark. At that point, even $5 was a tremendous help to me, so losing it was a big loss, but it was only years later when I started getting into video that I wished it never got shut down as I’ve always wanted to have an active YouTube channel of my own.

Fortunately, after making an appeal for the nth time, I got my AdSense reactivated after 7 years. Not that I’m back to square one, but I do feel that I’ve only started with this whole blogging thing with Avoiderdragon, and I wish to take it even more seriously than before.

Being Lied to by My Analytics

Taking this seriously means having to look at analytics data to know what steps I can take next to improve, and that’s when I started encountering this problem. There were some questionable URLs popping up in referrals, which I thought was just a part of the deal with this endeavor. However, I would later find out that they have a bounce rate of 100%, average browsing time of 00:00, and of absolutely no benefit to me.

As if there aren’t enough problems that hinder me from making this work, my analytics are lying to me as well (sort of). It’s not the analytics’ fault, but the fact that my optimism is being played with to give me false hopes is quite messed up. If I’m ever going to do this blogging thing right, I have to get the most accurate stats possible to correctly assess my performance, so the referrer spam has got to go.

An Encounter with Semalt

As always, I was playing around with new ways to get more hits (admittedly with tricks), and I encountered this website called Semalt. It had popped up in my referrals, so I visited it and thought it was a legit SEO company that can help the website, so I registered and started looking at their tools. Suddenly, my cellphone rang.

On the other end was some guy from Semalt asking me about my website. While I talked to him about “what Semalt can do to help,” I checked the number to see where the call was coming from, which was in Florida. I then searched on Google what Semalt was about, and that’s when I first encountered the term “referrer spam.”

Of course, I immediately realized what it was about, and that was while talking to the Semalt representative. I politely told him that I will check their plans out while I was actually looking for a way to unregister that account. I deleted the account a few seconds after I hung up, then looked for ways to remedy this referrer spam problem.

Filtering in Google Analytics

Here is the actual guide portion of this post. Do take note that the following information is available everywhere else online, but most of them do have minor differences and variations. Also, I believe that sharing this can help with coverage so more people with the same problem can find these solutions.

Google Analytics is perhaps the most powerful analytics tool online, mostly because Google rules everything as of now and most of the really big websites earn from Google AdSense. From what I could gather, this is the solution.

First of all, access your Google Analytics account, then access this:

Admin -> Account -> All Filters

screenshot_google-analytics_filters

Click on “Add New Filter,” enter the following, then click “Save.”

screenshot_google-analytics_add-filter

Here are most of the sources of referrer spam that I’ve had trouble with over time:

semalt.com (and semalt.semalt.com)
social-buttons.com (with multiple subdomains)
addons.mozilla.org (with /en-US/firefox/addon/ilovevitaly/ as referral path)
4webmasters.org
hulfingtonpost.com (misspelling of huffingtonpost.com)
darodar.com (with subdomains)
get-free-traffic-now.com
ilovevitaly.com (and other domains)

Blocking Them Through .htaccess

NOTE: Messing with your .htaccess file is almost like messing with the registry of your Windows — it’s risky. Therefore, either you proceed with caution or make use of a plugin like this (if you are on WordPress).

This is only for blogs with their own web hosting since you’ll have to access a file through FTP for this solution.

You can prevent those sites from accessing your website in the first place, but it will take some fiddling with sensitive files to do so. The .htaccess file in the root directory of one’s website is the most commonly cited file to edit for this purpose.

Open your .htaccess file in a text editor through an FTP client or the file manager of your website’s backend and add the following:

# BLOCK Referrer Spam
RewriteEngine On
RewriteCond %{HTTP_REFERER} ([^.]+\.)*simple-share-buttons\.com [NC,OR]
# END BLOCK Referrer Spam

This is the method I use for this website and it looks like it’s working so far, but I’m still not sure if it’s truly the be-all-end-all solution on this end.

Add more RewriteCond for every domain you wish to block. You need to add a backslash before every dot in the domain name for it to register as the dot symbol. The ([^.]+\.)* part is to accommodate subdomains.

Conclusion

To be honest, I’m not sure if this is enough to prevent referrer spam. It seems to be working for the most part, but it does take a while before Google Analytics stops showing the hits from those domains. Also, new ones keep popping up all the time, so there is a constant need for vigilance.

But then again, if you’re someone who is serious about this stuff, then you’d be keeping an eye on your analytics anyway and would know if they’re getting hit by referrer spam. With that in mind, I’m rather curious about how bigger websites respond to referrer spam, whether they address it quickly or have no need to do so.