Many friends ask me to limit only certain ip are allow to access their website. To limit specific ip to access website is easy with .htaccess. Just follow the steps below and you will be able to set your website to be view by specific ip:-
- Create a file and name it .htaccess with the content below:-
123order deny,allowdeny from allallow from 888.888.888.888
Please change 888.888.888.888 to the ip you want to allow.
- Once the file is created, put it at your root directory. (This will be in http://www.yourdomain.com/.htaccess)
- Done! Now your website is can only be access by the ip you set!
- If you want to allow multiple ip address to access your website, just create another record of ip like below:-
12345order deny,allowdeny from allallow from 888.888.888.888allow from 999.999.999.999allow from 000.000.000.000
[tags].htaccess, limit ip access, htaccess limit ip access, limit ip access website[/tags]