Enable or remove restricted access.

This article explains how to enable or remove restricted access in your hosting directories using Directory Privacy in cPanel, so only authorized users can view the content.

What is it for?

A password-protected directory limits access to certain content to a group of users defined by you. It is useful for:

  • Sharing private files with clients or colleagues.
  • Restricting a temporary administration area.
  • Publishing information that should not be accessible to the general public.

Access: Log in to cPanel from the client portal → Log in to cPanel, or directly at https://yourdomain.com/cpanel.

Enable restricted access

  1. Log in to cPanel.
  2. Go to Files → Directory Privacy (Directory Privacy).

Privacidad del directorio en cPanel

  1. In the folder list, choose the directory to protect and click Edit.

Listado de directorios para proteger

  1. Check the box Password protect this directory.
  2. In Enter a name for the protected directory, enter a description that visitors will see when authenticating (e.g. Restricted area, Authentication required, Client area).
  3. Click Save.

Activar protección por contraseña del directorio

Create authorized users

Protecting the directory is not enough: you must create at least one user with a password so they can log in.

  1. In the same screen of the protected directory, look for the section to create user.
  2. Fill in Username and Password (you can use the cPanel generator).
  3. Click Save or Create.

You can add multiple users to the same directory if you need to.

Important: The protection applies to the chosen directory and, by default, also to its subfolders. Do not protect the entire public_html if you want the main site to remain public; choose a subfolder (e.g. public_html/private).

Remove restricted access

  1. Log in to cPanel → Files → Directory Privacy.

Privacidad del directorio en cPanel

  1. Choose the directory from which you want to remove protection.
  2. Uncheck the box Password protect this directory.
  3. Click Save.

The directory becomes publicly accessible again. Users created for that directory cease to have effect, although you can delete them manually if you no longer need them.

Common issues

  • It asks for a password but I don't have a user: create an authorized user in the corresponding section of the protected directory.
  • The password doesn't work: verify username and password; try creating a new user.
  • The whole site asks for a password: you probably protected public_html or a root folder; move the private content to a subfolder and protect only that one.
  • Authentication loop: clear browser cache or try in a private window.

If you cannot enable protection, the directory does not appear in the list, or restricted access does not work as expected, open a ticket from the client portal or consult via the site's online chat.

  • acceso restringido, privacidad de directorio, archivos cpanel, proteger archivos
  • 25 Users Found This Useful
Was this answer helpful?

Related Articles

How to connect and upload files using FTP-FileZilla

This article explains how to upload files via FTP to your hosting plan using the free FileZilla...

I cannot publish files within my service

This article helps you troubleshoot when you cannot upload or publish files on hosting with a...

Anonymous FTP Precautions

This article describes the security and usage precautions of anonymous FTP in a cPanel hosting...

FTP folder utilities

This article explains the meaning of each folder in your hosting account when connecting via FTP...

Creating and managing FTP accounts

This article explains how to create and manage additional FTP accounts in cPanel to grant...