How to block a site & all proxy?

H4CK3R

Well-Known Member
Oct 14, 2011
45
0
56
cPanel Access Level
Website Owner
Hi,
I want to block all proxy site through htaccess, is it possible?
If yes, then how?
Also, i want to block a site from accessing my site(They are using a bot).
They have a large number of servers and they are changing their server IP at rapid rate. Is it possible to block site not by IP, i.e. by adding deny from www[dot]helloworld[dot]com instead of deny from 123.456.789.000?
Please help in detail.
Thanks.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
For blocking proxy servers, you might try the following:

How to Block Proxy Servers via htaccess

Basically, using this in the .htaccess file:

Code:
# block proxy servers from site access
# http://perishablepress.com/press/2008/04/20/how-to-block-proxy-servers-via-htaccess/

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]
As for denying a domain to access the site, you can use the following:

Code:
<Files *>
Order Allow,Deny
Allow from all
Deny from domain.com
</Files>
Please replace domain.com with the domain name that keeps hitting the site.
 
  • Like
Reactions: Samet Chan

qwertyguy

Registered
Jun 28, 2013
1
0
1
cPanel Access Level
Website Owner
Will blocking all proxy servers have any negative effects on google or other search engines rankings or crawling of your website?
 

Serra

Well-Known Member
Oct 27, 2005
272
21
168
Florida
Will blocking all proxy servers have any negative effects on google or other search engines rankings or crawling of your website?
No, Google doesn't proxy. They just show up. The only thing I've seen that can kill Google is a connection limit that is set too low.
 
  • Like
Reactions: Ion Robert