Referral Spam

Block /Referral in Google Analytics

Welcome to the guide on blocking the /Referral– an instance of referral spam. Its purpose of existence is to spam Google Analytics with false visitations and to gain a higher search engine ranking position for the spammer’s site – where the spam bot comes from. As already mentioned, the technique employed is to utilize a bot – a program – to perform bogus visits to your site. They usually have zero session time – since the bot doesn’t need to spend any time on the actual site – and are called ghost spam. While usually harmless for your own website, they no doubt clutter your statistics with false information. The creators  of the /Referral hope you search or click on the name appearing as their visit to lure you into their own odd website. In it you may find fraudulent offers or services that may be superficial. It goes without saying that it’s a bad idea to trust them no matter the ostensible goal. Read below to learn more about referral spam works and what are the best practices you can apply. At the bottom you can find the steps involved in the suspension of the spam – however we recommend you read the article before proceeding there.

How does work in general? What are the most important traits one should know?

The /Referral uses a spam bot to access your website for an indefinite amount of times. It uses a fake referrer URL that links back to the spammer’s website – the one they wish you to visit. When the manifestations of it come with 0 bounce rate and practically no session time, they are referred to as ghost spam – because they do not actually visit the website. This registers on your Google Analytics as a normal visit (but it’s not), which can be quite disruptive and can alter your data beyond recognition. Keep in mind that there is no harm engendered on your personal website. Your own ranking on the search engines stays the same. However, the same cannot be said for the spammers. This is’s chief goal – to increase its own ranking by spamming you. Generally speaking, search engines use small programs called crawlers to search for key words and search terms in websites. When it comes across the fake URLs in your logs – if they are public – it raises the popularity and ranking of that URL. This is most likely the foremost reason why referral spam exists.

The Referral Exclusion List and other do’s and don’ts

Many of you may be familiar with the this tool; however, it is misleading to trust it to do the job in battling referral spam. If you’ve been using it up until now, we strongly recommend you halt this habit – because it will only complicate the pre-existing problem. The moment you enter the name of the fake URL being used, Google Analytics begins searching for the source of the visits, which results to nothing. Once this happens, Google Analytics interprets it as legitimate and you will begin seeing it as normal traffic. This makes the problem even worse for you, since now you cannot distinguish the spam from the real thing. This is why you shouldn’t use this tool to mitigate the incoming spam.

It’s always a good idea to use the best hosting provider possible for your use case. Skimping on this simple fact can send you into hurdles of trouble along your way. Different hosting companies provide you with different tools – spam filters being the most common example. Predominantly, the price of the service vastly affects the tools you are given. Spending a bit extra money will safeguard you for the future – since you’ll most likely acquire better spam filters that possess a bulkier list of spammers.

Hiding the logs of your website in a more private area of the server – where search engine crawlers cannot find them – can be a double edged sword. On one hand you stop the spammers from advancing their websites in ranking; on the other however, you harm the statistics of the legitimate visits.

As far as affiliate marketing campaigns go, we recommend you refrain from using them too much if you do not happen to have a good host. The spam filters you have at your disposal play a big role here. The better they are – the looser you can be with this type of marketing. Reason being is that spammers often find your website through these means.

While following the above reduces the chances of ‘catching’ spam, they are not a guarantee of safety. Referral spammers continue to sharpen their methods and techniques every day. The best way to combat them – should you be subjected to them – is to follow our steps outlined below.

Block referral

STEP 1: In your Analytics account go to Admin —> All Filters.

pic 1(1)

STEP 2: Next, click New Filter and add in the Filter Name value.

STEP 3. Select the Custom Filter Type. In the Filter Field —> Campaign Source. In the Filter Pattern text box, add and click the Save button at the bottom of the webpage.

Pic 2(1)

Blocking referrer spam through .htaccess

If you know how to access your .htaccess file, you just need to input the following code in there:

RewriteCond %{HTTP_REFERER} [NC,OR]
RewriteCond %{HTTP_REFERER}
RewriteRule .* - [F]

If you don’t know how to access it, do the following:

Login to your cPanel account —> File Manager —> click the check-box “Document Root for—> your website. A side note: click on “Show hidden Files” and then Go. Find the .htacess file, right click it and choose Code Edit. Input the code I gave you and Save Changes.

Did we help you? A thank you in the comments goes a long way to warm our hearts!

Leave a Comment