Plesk

A website hosted in Plesk is not accessible: 401 Authorization Required

Symptoms

Cause

The website's Document Root ("/") is protected either at Domains > example.com > Password-Protected Directories or in the .htaccess file (Linux).

As a result, website visitors unable to see the website content without authorization.

Resolution

Apply one of the following solutions:

 

Solution I: Disable the password protection for the Document Root ("/") of the website

 

    1. Log in to Plesk.

    2. Go to Domains > example.com > Password-Protected Directories.

    3. Select the document root directory and click Remove Protection:

      On a Linux server, if the password protection directory for "/" does not exist, open the .htaccess file via Plesk File Manager and remove the following lines:

      AuthType Basic
      AuthName "Secure Content"
      AuthUserFile /var/www/vhosts/example.com/httpdocs/.htpasswd
      require valid-user

 

Solution II: Add a user in Plesk and allow him to access the website with the password

 

Add a user in Plesk and allow him to access the website with a password using the steps from this KB article.