How to block traffic from autosurf sites using .htaccess

How to block traffic from autosurf sites using .htaccess

If you are making some serious money from Google Adsense or other online ads publishing company, you need to read this post seriously. Failure to do so may caused your account Adsense from getting banned or being disabled.

How to block traffic from autosurf site using .htaccess

Image credit: Free Digital Photos

According to their blog, Adsense strictly prohibit any means of artificially generating ad impressions or clicks, including third-party services such as paid-to-click, paid-to-surf, auto-surf, and click-exchange programs.

Autosurf is the automated traffic exchange sites or better explained by Wikipedia as the traffic exchanges that automatically rotate advertised websites in one’s web browser. Therefore, they are capable of bringing a large amount of traffic to the advertised websites. Members earn credits for each site that they view, which can then be spent to advertise members’ sites by adding them to the autosurf rotation. Sites may additionally be added by external advertisers who pay the autosurf operators.

Well, what if I am a good blogger and I am always posting a good unique articles and doing everything according to Google Webmaster preferences and whitehat SEO practitioner and in the end my rivals or my competitors submitted my website URL to the autosurf sites?

Not only that my website will get infused with unwanted bullshit traffic and possibly lead to server overloading, it will also cause to my Adsense account getting banned.


Here’s how you can block the traffic from this autosurf sites using .htaccess rules from entering your website

There are actually 2 types of .htaccess rules that can be used

.htaccess rules Type 1

RewriteCond %{HTTP_REFERER} auto_surf_site\.com [NC,OR]
RewriteCond %{HTTP_REFERER} auto_surf\.com [NC,OR]
RewriteRule .* - [F]

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

.htaccess rules Type 2

SetEnvIfNoCase Referer "^http://www.auto_surf_site.com/" BadReferrer
SetEnvIfNoCase Referer "^http://www.auto_surf.com/" BadReferrer
order deny,allow
deny from env=BadReferrer

They will then redirected to a error 403 Forbidden page like below

How to block traffic from autosurf sites using .htacess

There are hundreds and perhaps thousands of such as autosurf websites and it is impossible to block all of them. How can I block all of them and my .htaccess rules must be pretty damn long to list all of them?

You don’t really need to block all of them because not all of them is autosurfing to your website. All you need is just identify them out using Google Analytics or WordPress.com Stats plugins. Here’s how

Using Google Analytics


  1. Login to your Google Analytics account
  2. Go to Traffic Source > Referring SitesHow to block traffic from autosurf sites using .htaccess
  3. Check on the list of domains whereby it is not familiar to you or having the keyword “auto“, “traffic“, “exchange” or similar on the domain name to and giving you a rather high referring traffic

Using WordPress.com Stats
  1. Login to your WordPress Dashboard account
  2. Go to Site Stats> ReferralsHow to block traffic from autosurf sites using .htaccess
  3. Check on the list of domains whereby it is not familiar to you or having the keyword “auto“, “traffic“, “exchange” or similar on the domain name to and giving you a rather high referring traffic.
That’s it. Feel free to let me know if you find any new .htaccess rules or having any questions.

4 thoughts on “How to block traffic from autosurf sites using .htaccess

  1. Anuradha - September 24, 2011 at 8:56 pm

    Great article………….thanks for sharing such an intuitive article with us Arren

  2. Rameesh - October 23, 2011 at 11:49 pm

    FYI, this might have been a problem a few years ago but Adsense no longer show ads on pages if the traffic is originating from a framed page or if the traffic is redirected by a proxy.

  3. Jefry - April 16, 2012 at 11:02 am

    autosurf site to make my blog bandwidth thinned
    thanks for the tutorial

Share your thoughts with the community