There are a number of WordPress plugins designed to block referrer spam from accessing your website and affecting your analytics data. To find out if your website is affected read our earlier blog post Is referrer spam affecting your website metrics?
You can find instructions on how to block referrer spam with WordPress below:
The following instructions assume you are familiar with both WordPress and installing plugins. We cannot be held responsible for any detrimental effects and we do not provide unpaid support for these or any other instructions. Always take a backup!
SpamReferrerBlock
This free plugin blocks popular referrer spammers using an automatically updated blacklist maintained by the plugin’s author with third party suggestions.
Once installed there are some basic options to configure. You can also add your own custom blacklist.
Semalt Blocker
This free plugin blocks and redirects visits from Semalt, which is just one of the many referrer spammers. If you are only receiving referral spam from this source then give it a try.
Alternative Plugins
A number of new plugins, including Block Referral Spam and Referrer Spam Blocker, have appeared in the last few weeks but currently have few installations or reviews by which to judge them.
Please be aware that WordPress plugins will not stop ghost referrer spam from sources such as 4masters.org, darodar.com, webmaster-traffic.com, co.lumb.co etc these are being injected directly into Google Analytics collection servers. So we strongly recommend you also filter referrer spam within Google Analytics otherwise your website metrics will still be affected by these false referrer visits.
Related blog posts
Is referrer spam affecting your website metrics? How to block referrer spam in Google Analytics How to block referrer spam with an .htaccess file