What is Referrer Spam?
Referrer spam is a spamming technique where fake traffic data is sent to a WordPress website. It aims to taint a website’s analytics data with spammy keywords, domain names and URLs. The spam affects your Google Analytics reports too as this data (fake traffic) appears under referral data and may affect the session reports, overall page views and bounce rates of your website. So, if you observe any suspicious-looking domains in your referral reports, probably they would be spam referrers.Methods to Block Referrer Spam Traffic
Blocking these spam referrals can better your Google Analytics reports and ensure that the data isn’t contaminated by spam requests. You can do this with the simple methods listed below.1. Use strong software/security tool
Referrer spam is just one of the many types of spam that can affect your website. Therefore, it is important to always stay prepared and ensure high website security. To avoid such types of WordPress security threats and vulnerabilities, you can use a tool like Sucuri. It is a powerful firewall and security software for WordPress websites that protects your website against Trojan Malware and referrer spam. Sucuri Website Firewall blocks the widely known spammy referrals by default. Moreover, whenever it detects new referral spammers, it adds them to the block list, preventing them from attacking your website.2. Blocking it manually with a plugin
If you aren’t using Sucuri, then you can use this manual method to check the referral traffic and block them.- Install the Stop Referrer Spam plugin
- Upon activation, navigate to Settings -> Referral Spam page to review the settings of the plugin. It uses a referral spam blacklist that Matomo publishes (formerly Piwik, an open-source analytics software)
- You can even enter suspicious domains that are spamming your Google Analytics reports already.
- Click on the ‘Save’ button to store your settings
3. Set up Google Analytics filtering to block the ghost referrals
Sometimes, even after applying the above-mentioned methods, you may see the referrer spam in your Google Analytics reports. Sucuri or any other plugins are unable to block them as these websites don’t visit your site at all. This type of spam is called ghost spam. They directly send the requests to Google Analytics using your UA tracking code, the code used to connect your WordPress website with your Google Analytics account. As it is often added to the website’s header section, anyone can find the code and generate referrer spam with it. To block these websites, you need to set up the filters in Google Analytics.- Log in to your Google Analytics account, click the drop-down option at the top of your Analytics home page and choose the right website property.
- A popup window will appear. Here, you can choose your website view.
- After you have selected the appropriate property and original view, navigate to Audience» Technology » Network.
- Select the hostname as the primary dimension and expand the result to ‘Monthly’.
- Create a filter inclusive of only the valid hostnames for your website by clicking on ‘Admin’ at the end of the Analytics panel on the left-hand side.
- Now you need to create a new view for adding the filters. Do not add filters to your ‘All Website Data’ or original view because filters are the permanent rules that are set for altering your Analytics data. If you commit any mistake while setting the filter rules, it will alter your website’s data permanently and give you incorrect reports. Therefore, create a new view for adding the filters by clicking on ‘Create View’ button.
- On the next screen, you will see a field to name the view you created. Give it a name and click on ‘Create View’.
- Check if your new view is selected and go to ‘Filters’.
- You will see the filter screen with the ‘Add Filter’ button. Click the button to get started.
- Enter your filter information here. Herein, add your filter name (like Valid Hostname Filter).
- Select your filter type as Custom and click on ‘Include’. Ensure that the Filter Field below is Hostname.
- Click the ‘Save’ button
- Check your Google Analytics reports after 24 hours to see if the changes are implemented.

Write A Comment