Web page optimization
Referrer spam is a major annoyance for many webmasters. On this page, you'll learn how to remove referrer spam from your website statistics.
Referrer spam happens when someone is making repeated website requests using a fake referer URL to the site the spammer wishes to advertise. In the website analytics of the spammed website, it looks as if the spammer is linking to the website although there is no real link. Referrer spam is done for two reasons:
If your website statistics show a link to your website but you cannot find the link, then it is very likely that the 'link' is just referrer spam and not a real link.
You can either block or filter referrer spam. If you filter the referrer spam in the Google Analytics interface, the spam still exists. For that reason, it is better to avoid referrer spam before it happens.
To block referrer spam, you have to adjust the .htaccess file of your website. Copy the text from the following box and paste it into the .htaccess file of your website. You usually find it in the public_html directory of your web server.
Be careful: Change the .htaccess file of your website at your own risk. Make a backup of the file before you change it. If you don't feel comfortable making these edits, ask your webmaster.
If you add the above to your .htaccess file, future sessions won't show the referrer spam. It won't affect the sessions that have already happened.
If you add the commands above to the .htaccess file of your website, you will save a lot of time because you don't have to check all of these fake referrers.