Home :: Blog :: Articles :: Web-Hosting :: How to Block Auto-Surf Websites or Referer Spam using .htaccess

How to Block Auto-Surf Websites or Referer Spam using .htaccess

How to Block Auto-Surf Websites or Referer Spam using .htaccess
Category: Web-Hosting
Posted:
Views: 2736
Comments: 0 [Post]
Synopsis: Here I will show you a successful method to Block this Referer Spam or Auto Surfing websites that consume your traffic and server resources (CPU excess usage) and create problems with other sites and so on..
Here I will show you a successful method to Block this Referer Spam or Auto Surfing websites that consume your traffic and server resources (CPU excess usage) and create problems with other sites and so on..

There is no 500 Internal Server error in this method. No need of php.ini file, a .htaccess file will do the magic.

Use this in your htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www.)?theultimateprofessionalautosurf.com/?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?365autosurfer.com/.*$ [NC]
RewriteRule .(gif|jpg|jpeg|png|mp3|mpg|avi|mov|pdf|swf|tif|tiff)$ - [F,NC]

Make sure you add or remove these file extension like gif or jpg depending on your site.


Comments on How to Block Auto-Surf Websites or Referer Spam using .htaccess

Start the conversation by being the first to comment!

Share comments

Your Name: *
Comments: *
Please Note: HTML Markup will be automatically removed.
The ability to post urls has been disabled by the site administrator.
*
Type the characters you see in the picture:

*