Skip to content
  • GDPR-compliant
  • 100% hosting in Germany
  • Personal contact
  • Support included
  • Provisioning within 24 hours
Error & Status Codes 1 min read

HTTP status code 401: Unauthorised

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.

Was this article helpful?

You might also be interested in:

Personal support

Of course, our support team is also happy to assist you personally. If you cannot find what you are looking for in our knowledge base or require personalised support, please do not hesitate to contact us. We’re here to help you and to ensure that your experience with our products and services is as smooth and enjoyable as possible.