How To Block Proxy Visitors From Your Web Site

How To Block Proxy Visitors From Your Web Site?

Having trouble with proxy visitors defacing your website, leaving spam, scrapping your hard work content? Proxy visitors can be blocked by adding a change to your .httacess file.

If you have access to your .htaccess file, you can add this bit of mod_rewrite code to give proxy visitors a “Forbiden” 403 server response.

# Block Proxy Visitors from site access
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ - [F]

Let us know how this helped you Block Proxy Visitors from your site!