How to password-protect folders in cPanel?

How to password-protect folders in cPanel?

The video shows an older version of cPanel, so the interface may look slightly different.

You can password-protect a folder on your website so that only people who know the username and password can see its contents – for example internal documents or a development version of your site.

  1. Log in to cPanel.
  2. In the Files section, click Directory Privacy.
  3. Find the folder you want to protect (usually inside public_html) and click Edit.
  4. Tick Password protect this directory, enter a name for the protected area and click Save.
  5. Click Go Back, then enter a username and password under Create User.
  6. Click Save.

The next time someone opens that folder, the browser will ask for a username and password.

Tip: don't protect the whole public_html folder if you want your website to stay publicly accessible.

  • cloudlinux
  • cpanel
  • php
  • linux
  • mysql
  • centos

Hosting for Croatian businesses, on servers in Germany, with support in Croatian.

EXTREME HOSTING d.o.o.

Partner

Social media

Payment methods

American ExpressDiners Club InternationalVisaMaestroMasterCardDiscover

Bank transfer: IBAN HR1324840081135140481

All prices are shown in euros. Orders are completed on xhosting.hr.