LIVE
CHAT

Knowledge Base » Web Hosting

How do I prevent access to my files in my web hosting account?

Art. Nr: 70  |  Rating: 3.5/5 from 2 votes  |  Last Updated: Thu, Feb 23, 2012
starstarstarstarstar

Preventing unauthorized access to certain files within your web hosting account is another major step to improving overall security. Simular to the technique used to disable directory listings within cPanel, this takes it one step further and limits access to certain files within your web hosting account directly. The advantage of using file based security, is that it ensures that no one can inject your site with malicious code into a specific file within your web hosting account.

In the below mentioned code, you will be able to see an example of how to limit access to deny access to a certain file. Please note, that you will need to make subtle changes to make it work correctly for your web hosting implementation. Additionally, the below mentioned code will go into the .htaccess file, which is located in the /public_html/ directory.

Order allow,deny
Deny from all

Please note, that this code is not supported by our web hosting support department, so for additional assistance, please feel free to reach out to our web hosting community with avid web developers who'd be glad to answer any questions you may have.

If you have any further question, please feel free to get in contact with our cPanel web hosting support team for further assistance.

Post your Comments

Popular Tutorials

RSS Feed
Please see below, some related knowledge base tutorials, which are related to your search query. Please feel free to contact us if you are not able to find what you are looking for.