How to Make My Website Open only on Few Ip Address - Means only admin can Login

Dear all

Is it Possible to make website open only on Few IP addresses. I want only admins can login to my website from different location using only their personal computer. If someone try to access from a computer other than assigned IP address he should not be able to view my site. Please let me know if it is possible.


You can use a .htaccess file to limit access to your website.
Here’s how:

Create a file in your website’s root directory and name it .htaccess
Edit the file with a text editor and enter

order deny,allow
deny from all
allow from
allow from

Replace with the appropriate IP addresses.

This will reply on your users having fixed IP addresses, however.
Maybe it would be better to consider password protecting the site instead.
You can also do this using .htaccess.
Let me know if you want me to tell you how.

Hi pullo

Thank u so much for the reply. please let me know the password protecting method also.

Hi there.
The first thing I would do is find out if your hosting company provides such a service.
Who is your website hosted with?

Actually it’s a dating site. I want to use it for offline purpose. I still not hosted that site. Planning to host in sitevalley.

Ah ok.
Do you just have the files stored on your PC or do you have a server running locally?
if so, which one?