Hide Webpage

Is there a way to keep everybody from seeing a website?  Can you setup in the htaccess file only certain IP addresses that can actually view a website?

If so, can you give me an example on how to write it?

I have a website/client that does not want anybody to see but a handful of people.  Any suggestions?
LVL 7
rgranlundAsked:
Who is Participating?
 
eugenbvConnect With a Mentor Commented:
Try adding to .htaccess
order allow deny
deny from all
allow from <your_IP>

Open in new window


0
 
MISOperationsCommented:
You could create a password prompt to access the site, however preventing a domain from being accessible to the entire internet, no.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
You could setup a proxy that allows 'your' clients to view the site. Other clients (not wanted ones) could be redirected to see a different site. This way 'your' site is somewhat hidden.
0
 
atipicoCommented:
The best way to grant access to certain persons is using passwords.
If you use IP addresses and deny certain IPs using .htaccess, if any user is using dynamic IP, he/she will eventually end up being denied access to the site.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.