Search code examples
.htaccessrobots.txtspamhttp-refererreferrer-spam

How to block refrer urls - what is the best method?


I am getting a lot of spam refer urls in my analytics causing an increase in my site's bounce rate. Some of the urls are using sub domains such as site1.spamsite.com and site2.spamsite.com. What is the best way to block these? I have looked at .htaccess and robots.txt... Thought I would ask the best practice / solution before I implement. Thanks.


Solution

  • Tried various htaccess functions but kept getting sub domains getting through. Installed this plugin:

    https://wordpress.org/plugins/block-referer-spam/
    

    has all spam referrers listed already and is automatically updated everyday with the latest "black list"