Portal Home > Knowledgebase > Security Tips > How to protect certain folders.


How to protect certain folders.




This is very useful for 'admin' areas.  If you do not want everyone to have access to a folder under your public_html tree, there are a couple of authentication methods you can use.  The first, is to set up IP verification, using an .htaccess file.  These files tell the webserver to check certain criteria before allowing someone in.  To deny all, except your ip address, paste the following in the .htaccess file (or create a new file if needed), in the directory you wish to protect:

<Limit GET POST>
order deny,allow
deny from all
allow from your.ip.address.here
</LIMIT>

Make sure you put in your ip address above.  The second way, is to password protect the directory.  This allows you to create user names and passwords for everyone that you wish to allow access to.  It is also very useful for tracking purposes, as all logins are logged.  This way is recommeded if you have many people accessing a protected area, or, if your IP changes frequently.  To use this feature, log in to your CPanel control panel, and find the "Password Protect Directories" section.  The information there should guide you through the rest of the way, however, if at any time you have any questions, please feel free to open a ticket through our client support area.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Passwords..... (Views: 1199)