.htaccess block spam referral traffic?

4 replies
  • WEB DESIGN
  • |
Hi all,

We've recently seen a surge in referral traffic from domains that feature just a white page with an advertisement. It was suggested that we disavow these links in Webmasters, which we've done, but we would also like to take it a step further as the traffic is impacting other areas of the site.

I've done some searching and it seems we can use .htaccess to restrict access from these spam referrals, is that a safe route to go? I'm worried about making any errors with the .htaccess file so I would greatly appreciate any advice on the matter. Our website is actually on NGINX so we cannot edit a .htaccess file as such but our hosts have asked that we provide the would-be .htaccess changes that they will then change to an NGINX rule.

This is the contents I found from a similar topic but I just wanted to clarify as I'm not sure what the NC,OR and other elements are.

<ifModule mod_rewrite.c>
RewriteCond %{HTTP_REFERER} nym1\.ib\.adnxs\.com [NC,OR]
RewriteCond %{HTTP_REFERER} lax1\.ib\.adnxs\.com [NC,OR]
RewriteCond %{HTTP_REFERER} sin1\.g\.adnxs\.com [NC]
RewriteRule .* - [F]
</ifModule>

There is also another domain that I would like to add but I'm not certain how to do so

RewriteCond %{HTTP_REFERER} a\.rfihub\.com [NC] - Would that be correct for spam traffic from a.rfihub.com?

Any help would be greatly appreciated.

Thanks.
#block #htaccess #referral #spam #traffic
  • Profile picture of the author Ron Killian
    Another option, if you have cpanel. you can block certain IP's. Just add the IP and cpanel adds the necessary code to your htaccess file for you.

    Is that what you need?
    Signature
    PLR Affiliate Program Has Launched! Easily Promote Over 5,000 PLR and MRR Products.

    Largest Selection of PLR Articles on the Planet! PLR Ebooks, PLR Video, PLR Websites and more with Private Label Rights
    {{ DiscussionBoard.errors[9787489].message }}
  • Profile picture of the author 2WDHost
    Hi SoloSmith.

    1. I would suggest simply asking your host to block spam referral traffic from specific referrals to your site instead of sending .htaccess rules.
    2. This could be useful for you in similar situations: htaccess to nginx converter
    {{ DiscussionBoard.errors[9790897].message }}
  • Profile picture of the author sunoy14
    I think blocking IPs in cpanel as Ron Killian suggested would be easier.
    Signature

    Web developer at www.rom-link.com. Web design, themes and plugins.
    Free guitar lessons www.mamamusicians.com

    {{ DiscussionBoard.errors[9793415].message }}
  • Profile picture of the author bakintime
    all you have to do is delete the link all together it saves value on extra problems as you carry on period.
    {{ DiscussionBoard.errors[9810115].message }}

Trending Topics