How to Password Protect Directories Print

  • 0

Password Protecting Directories

Protect specific folders on your website with username/password authentication.

Enable Directory Protection

  1. Log into cPanel
  2. Go to Files > Directory Privacy
  3. Navigate to folder you want to protect
  4. Click on the folder name
  5. Check Password protect this directory
  6. Enter protection name (e.g., "Admin Area")
  7. Click Save

Create Authorized User

  1. After enabling protection, scroll down
  2. Click Create User or + User
  3. Enter username
  4. Enter password (or generate)
  5. Click Save

Testing

  1. Visit the protected directory URL in browser
  2. Browser will prompt for username/password
  3. Enter credentials you created
  4. Access granted if correct

Managing Users

  • Add more users: Click "Create User" again
  • Change password: Click edit icon next to user
  • Delete user: Click delete icon next to user

Remove Protection

  1. Go back to Directory Privacy
  2. Navigate to protected folder
  3. Uncheck Password protect this directory
  4. Click Save

Common Uses

  • Protect admin panels
  • Secure development/staging areas
  • Restrict access to private content
  • Add extra security layer to WordPress admin

Was this answer helpful?

« Back

Powered by WHMCompleteSolution