.htaccess – Limit website access by IP
I’ve been asked many times how to limit website access by allowable IP’s. This is fairly simple to accomplish with .htaccess. Simply follow the steps below:
- Create a file and name it .htaccess. Paste the code into it. Replace 255.255.255.255 with you IP address. (If you don’t know it, you can get it here: WhatsMyIP)
-
order deny,allow deny from all allow from 255.255.255.255
- Once the file is created, put it in the root directory. That’s it!
-
J. K. Rowling donates $15 million for MS clinic http://om.ly/tkkw
- Follow me
Last Tweet
-
Archives
Categories
My Favorites
- 37 Signals
- Andrew Warner
- Chris Coyier
- Chris Shiflett
- Collis Ta'eed
- Development Seed
- Drupal
- HubSpot
- James Padolsey
- Joel On Software
- John Resig
- jQuery
- Kevin Rose
- Life Hacker
- Magento
- Mashable
- Matt Cutts
- Matt Ryan
- MySQL
- NetTuts
- Noupe
- Photoshop Tutorials
- PHP
- Smashing Magazine
- Tech Crunch
- WoorkUp
- Wordpress
