HTTP 401 - Cause
The 401 (Unauthorised) status code indicates that you do not have access to the requested resource. This HTTP 401 status code usually occurs when directory protection (.htaccess + .htpasswd) is set up for the URL you are trying to access.
Solution/Troubleshooting
The first step is to enter the correct login details. If these have been changed or the directory protection has been reconfigured, it may help to clear your browser cache to remove any outdated data from the system.
If you are the website administrator, you can edit the .htpasswd file to change the login details or, alternatively, remove the directory protection.
There are various .htpasswd generators available online. In our web server control panel (PLESK), under ‘Website Settings’, you’ll find the ‘Directory Protection’ option, where you can directly create and configure .htaccess/.htpasswd protection.
Alternatively, this file can be created easily on the web server via the Linux shell using a single line of code:
htpasswd -c /zielpfad/.htpasswd WunschBenutzername
After submitting the command, you will be prompted to enter the password for the specified user; once you have entered the password twice to confirm, an .htpasswd file will be created in the specified path.