How to password-protect a folder or website
Password protection makes the browser ask for a username and password before showing a folder (for example /members) or a whole website. It is useful for a staging site, a private download area or an admin folder.
Steps
- Log in to the control panel (
https://your-server:2083). - Open Access Control in the menu (section Domains).
- Under Protect a folder / add a user, choose the Website.
- Folder (/ = whole website) —
/for the whole website, or a path such as/members. - Name shown in the login box — for example
Members area(optional; the default isProtected area). - Username — 2–64 letters, digits,
.,_or-. - Password — at least 8 characters, or click Generate.
- Click Save. The message Saved. The folder asks for the password within a minute. appears, and the folder is shown at the top of the page with its users.
Add or remove users
- To add a user, fill in the same form again with the same Website and Folder and a new Username. Saving an existing username changes its password.
- To remove a user, click × next to the name. When the last user is removed, the folder is public again.
- To remove the protection completely, click Remove protection and confirm.
Leech protection
Leech protection disables a username that is used from too many different IP addresses in an hour, for example when a password is shared publicly.
- Under the protected folder, enter a number in Leech protection: disable a username used from more than … different addresses in an hour, for example
5.0turns it off. - Click Save.
A disabled user is marked disabled (leech protection). Click Enable to let them in again. If every user of a folder is disabled, the folder stays closed.
Good to know
- The path is relative to the website:
/membersispublic_html/membersfor the main domain. - The password files are kept in the server's configuration, not in your home folder.
- Protection works for every file in the folder and its subfolders.
Common questions
Does this replace my website's own login?
No. It is an extra login in front of the folder, shown by the browser.
Can I protect only one file?
No. Protection applies to a folder. Move the file into its own folder and protect that.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- How to set custom error pages (404, 403, 500, 503)
Show your own page instead of the plain error for 404 Not found, 403 Forbidden, 500 Server error and 503 Unavailable on each of your websites.
- How to redirect a domain or page (301 or 302 redirect)
Send visitors of a page or a whole website to another address with a permanent (301) or temporary (302) redirect, optionally keeping the rest of the path.
- Domain document root explained (and how to change it)
What a domain's document root is, which folder each domain, subdomain and alias uses by default, and how to move a website to another folder.