Knowledge Base

Get Expert Website Hosting

Choose website reliability and expertise with SiteGround!

Home / Website Help / Other / How to block access to a specific folder?

How to block access to a specific folder?

Last update: Nov 11, 2021

To block all access to a specific folder in your account, add this rule to the .htaccess file in that folder:

Deny from all

If the .htaccess file does not exist, you can create it from your Site Tools > Site > File Manager.

To allow access again, delete or comment the above rule.

Share this article