ldo

Registered
Sep 7, 2014
1
0
1
cPanel Access Level
Website Owner
Hi,

I am hoping someone can advise me with a newbie question.

I would like to set up sub-domains on a dedicated server and use the deny IP feature to selectively allow access to these. Can anyone tell me if it is possible to selectively deny IP access to some sub domains or is it only possible to blanket deny IP across the entire domain set?

Thanks in advance.
 

avonni

Member
Sep 6, 2014
9
0
51
cPanel Access Level
Root Administrator
Find the .htaccess file inside subdomain folder, than add:

Code:
order deny,allow
allow from XXX.XXX.XXX.XXX
allow from XXX.XXX.XXX.XXX
deny from all
Where XXX.XXX.XXX.XXX are the IPs you want to allow.
This will deny access from all, except from these IPs.