0

My wordpress site is visited by a lot of spam referrals. I edited the .htaccess file to block some known spam referrals but that is not helping me since there are more and more spams referrals coming. Is there is any standard way to filter out the spam referrals? Please let me know.

Some of the spam websites visiting my blog are:

  1. simple-share-buttons.com
  2. 4webmasters.org
  3. free-share-buttons.com
  4. googlsucks.com
  5. theguardlan.com
zilcuanu
  • 3,451
  • 8
  • 52
  • 105

3 Answers3

0

The .htaccess file can control the access to your website, but this type of spam, commonly called Ghost Referrer Spam, hits directly your analytics and it never accesses your site, so it's pointless to block them from the .htaccess file.

To stop them you should add a filter in your GA. There are many approaches to do it, you can add a filter for every spammer(or stack them in one expression) or you could use a more advanced filter with your valid hostnames. You can check these answers for more information.

https://stackoverflow.com/a/28354319/3197362

https://stackoverflow.com/a/29717606/3197362

Community
  • 1
  • 1
Carlos Escalera Alonso
  • 2,333
  • 2
  • 25
  • 37
0

If you want to permanently block specific referrals you can do it with .htaccess file. To block referrals that you listed above, you can add this snippet to your .htaccess file:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*4webmasters\.org.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*googlsucks\.com.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*free\-share\-buttons\.com.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*simple\-share\-buttons\.com.*$ [NC]
RewriteRule ^(.*)$ – [F,L]

</IfModule>

List with many more "bad" referrals, you can find here: https://github.com/Stevie-Ray/htaccess-referral-spam-blacklist-block/blob/master/.htaccess

jere_hr
  • 284
  • 3
  • 11
0

The htaccess method did not work for me but, I was able to remove it from Google Analytics by using filters.

Go to your Google Analytics account and select the Admin tab.

Click on New Filter

Enter 4webmasters.org as a name for the Filter.

Select Filter Type Custom. In Filter Field, find and select Campaign Source. In the Filter Pattern text box, write 4webmasters.org After you set everything Save.

This can take 24 hours for Google to update it.

recnac
  • 3,744
  • 6
  • 24
  • 46
iconMatrix
  • 183
  • 1
  • 2
  • 9