Are you running your website on WordPress or have your own customized CMS? And getting referral spam traffic in your Google Analytics. Then don’t worry, today we are going to show you how to Block referrer spam traffic in WordPress as well as in Google Analytics
What is referral spam
The Referrer spam traffic is a way to increase the ranking of website traffic for spam website. The spammers want to increase their website ranking and search engine visibility, so they use referral spam methods. In short, the spammer sends multiple requests with fake URL’s to your website and site respond to that links and generate the content. In this way, the sites those publishing their access logs, including referrer statistics, will link back to the spammer website they want to advertise. Therefore, your website linking a low-quality website and helps them to improve rankings.
It also generates a fake traffic report in the Google Analytics as well as choke your bandwidth. In this article, we will show you how to block WordPress referrer spam in Google Analytics and save bandwidth.
Also if Google Algorithm detects that your website is linking to the poor websites, your own search ranking would be decreased.
Block Referrer spam traffic in WordPress Using Plugin
WordPress Plugins directory has several plugins that can be used to block referrer spam traffic in WordPress. These referrer spam WordPress plugins have their own database of spam domains to block referrer spam. They are using web services to actively monitoring the referral spam websites.
Block referrer spam traffic by using SpamReferrerBlock plugin
Step 1: Go to your admin dashboard and plugins->Installed Plugins search for SpamReferrerBlock.
Step 2: After installing and activating the SpamReferrerBlock plugin, go to settings ->Spam Referrer block settings page to configure it.
Step 3: At its admin page you will see several options to configure the plugin. It allows you to set what an evil spammer will see or even you can redirect them to custom URL.
Step 4: At the configure page, the plugin also gives the option to create a custom domain blocking list option. If you think that the plugin is unable to block some spam domains then add them manually. You can find them from your website Google Analytics data.
Step 5: At the same plugin’s settings page, it will give you a detailed list of spam website domains lists that are actively monitoring and blocking. The most up to date list of spam domain can be download from the server buttons. And if you want to help or share the list of your custom blacklist domains with the internet community, then click on Upload server button
Block referrer spam traffic by using Block Referer Spam plugin
This is another plugin which has same features as the SpamReferrerBlock plugin. Just install it from the WordPress plugin directory and activate to use it. On the configure page of this plugin, you will see the very straightforward interface and options. The Auto update is for updating the spam domain list automatically. The second option Block Mode, this option allows blocking the referrer spam traffic by using .htaccess or WordPress. If you do not have the .htaccess then WordPress block is preferable. Some other options are Manual update and custom blocks same as the SpamReferrerBlock plugin.
Block Ghost Referrals spam Using Google Analytics Filtering
Before going towards the tutorial part lets know a little bit about the ghost spam.
What is ghost spam
Unfortunately, the WordPress plugins are not able to stop some referrals traffic. Some Spammers are so strong in hijacking Google Analytics ID to launch the false traffic directly to Google’s servers. Theses WordPress plugins are helpless because these websites are not visiting your website. They are sending the URL request directly using Google Analytics using your UA Tracking code. The UA Tracking code is easily visible and anyone can see by using view page source option.
How to block Google analytics ghost spam
Step 1: First login into your Google Analytics account
Step 2: Click on reporting tab and select Hostname. You will see all the spam domain list from where you are getting the referral spam traffic. Please refer the screenshots
Step 3: After performing the above step you can find out all the spam hostname in the list. Note down the valid hostname list for your website. For example, www.how2shout.com, how2shout.com, mail.how2shout.com, are all valid hostnames for our website.
Step 4: Now click on the Admin tab and then Filter as shown in the screenshot.
Step 5: A filter screen will open, where you can set a filter reporting. Click on Add new Filter button and configure it as follow:
- Click on create new Filter option
- Give a Valid name to your filter as we have given Valid Hostname here.
- At Filter Type tab, click on custom
- Select Include option
- Under Include option, there is another field called filter field select Hostname option
- In the Filter, Pattern box enters your valid hostnames using Regex string. This filter pattern is very simple, just need to add a ^ sign before each hostname and a $ sign after it. Use the | sign to separate hostnames.
- The expression is given below just copy it, modify the how2shout.com hostname with your and paste it Filter pattern box.
You don’t need to put all of your subdomains if you have. Entering the main domain in the Filter pattern box will match all of them.
Step 6: Before saving the filter click on verify this filter link to see how the filter will affect your current view data, based on traffic. Please refer the screenshot.
Now finally click on save button and the effect of the filter will show in your analytics in at least 24 hours.
Filter to remove common Spammers in Google Analytics using Filter
If you have few common spammers in your list then you can use Filter exclusion option.
- Just create a new filter and instead of selecting the include option, select exclude as filter type.
- Under the exclude filter type select filter field called Hostname option
- In the filter, pattern box enters the common spammer sites in the given expression and save it. Change domain wth your’s spam domains.
You might like to see:
- Add Google Analytics Dashboard for WordPress
- Install and Activate Google Analytics on WordPress
- Remove WordPress Admin Page Traffic From Google Analytics
- How to Remove Malware From My WordPress Site