How to block referral spam to your blog

How to block referral spam to your blog

I don’t know about my other fellow bloggers out there but over the past month or so I’ve seen a huge increase in referral spams hits on the site. If you’re experiencing a similar problem there are steps you can (and should) take to limit the impact on your site.

 

What is referral spam?

Quite simply; these are website hits you’re recieving coming from various referral sites. Typically referrals are a good thing as it means someone else has linked to you and are feeding you traffic.. however the traffic coming from these sites is almost certainly automated and will leave your site after a single page view which greatly increases your bounce rate (the percentage of people who take one look at your site and then leave, not good!).

Why does this matter?

Bounce rate is hugely important in allowing search engines to judge the value of your website. A high bounce rate suggests that your site does not have very strong content and people are unlikely to stick around when reaching it. This subsequently has a knock on effect on your search engine rankings and analytics.

Identifying referral spam

When I logged into my analytics one morning back in December I was pleased to see the daily views had increased by about 20%. Looking into the aquisition data avaliable it seemed all of these additional hits were coming from an online shopping website hosted in Russia. Very odd. A quick google of the address found many others experiencing the same issue and and thus the referral spammer was identified. If you’re receving a large number of hits from a website completely unrelated to your content: chances are that it’s a referral spammer.

What you can do

The best way to deal with this referral spam is to block them from accessing your site in the first place. Luckily this is easy to do and relativly easy to maintain.

– Go into your site’s .htaccess file. This will be on the root of your public_html folder. On my host (Bluehost) this is accessed by logging onto your account and going: Hosting – cPanel – File Manager – (ensure hidden files are shown) – public_html – .htacess

– Click to edit this file and enter the below onto the bottom of the text:

#Block Spammy Website Referrers

SetEnvIfNoCase Referer cenoval.ru spam=yes
SetEnvIfNoCase Referer cenoval.ru/ spam=yes
SetEnvIfNoCase User-Agent cenoval.ru spam=yes
SetEnvIfNoCase User-Agent cenoval.ru/ spam=yes
Order allow,deny
Allow from all
Deny from env=spam

– Save the file. Job done.

You can edit the bolded sections to meet the url you’re receving the referral spam from. You can also add additional lines for multiple sites. eg:

SetEnvIfNoCase Referer BlackHatWorth.com spam=yes
SetEnvIfNoCase Referer http://blackhatworth.com/marketing/lounge/730430-apple-com-analytics-referral-traffic.html.com spam=yes
SetEnvIfNoCase User-Agent blackhatworth.com spam=yes
SetEnvIfNoCase User-Agent blackhatworth.com/marketing/lounge/730430-apple-com-analytics-referral-traffic.html spam=yes
SetEnvIfNoCase Referer hulfingtonpost.com spam=yes
SetEnvIfNoCase Referer hulfingtonpost.com/ spam=yes
SetEnvIfNoCase User-Agent hulfingtonpost.com spam=yes
SetEnvIfNoCase User-Agent hulfingtonpost.com/ spam=yes
SetEnvIfNoCase Referer priceg.com spam=yes
SetEnvIfNoCase Referer priceg.com/ spam=yes
SetEnvIfNoCase User-Agent priceg.com spam=yes
SetEnvIfNoCase User-Agent priceg.com/ spam=yes
SetEnvIfNoCase Referer semalt.semalt.com spam=yes
SetEnvIfNoCase Referer semalt.semalt.com/ spam=yes
SetEnvIfNoCase User-Agent semalt.semalt.com spam=yes
SetEnvIfNoCase User-Agent semalt.semalt.com/ spam=yes
SetEnvIfNoCase Referer buttons-for-website.com spam=yes
SetEnvIfNoCase Referer buttons-for-website.com/ spam=yes
SetEnvIfNoCase User-Agent buttons-for-website.com spam=yes
SetEnvIfNoCase User-Agent buttons-for-website.com/ spam=yes

SetEnvIfNoCase Referer bestwebsitesawards.com spam=yes
SetEnvIfNoCase Referer bestwebsitesawards.com/ spam=yes
SetEnvIfNoCase User-Agent bestwebsitesawards.com spam=yes
SetEnvIfNoCase User-Agent bestwebsitesawards.com/ spam=yes

SetEnvIfNoCase Referer simple-share-buttons.com spam=yes
SetEnvIfNoCase Referer simple-share-buttons.com/ spam=yes
SetEnvIfNoCase User-Agent simple-share-buttons.com spam=yes
SetEnvIfNoCase User-Agent simple-share-buttons.com/ spam=yes

SetEnvIfNoCase Referer event-tracking.com spam=yes
SetEnvIfNoCase Referer event-tracking.com/ spam=yes
SetEnvIfNoCase User-Agent event-tracking.com spam=yes
SetEnvIfNoCase User-Agent event-tracking.com/ spam=yes

 

 

Hopefully my fellow bloggers will find this useful in helping to block the referral spam and decrease their site’s bounce rate.

 

 

One thought on “How to block referral spam to your blog

Leave a Reply

Your email address will not be published. Required fields are marked *