Skip to content
OSULZER.AT

Is my website down?

Error 401: Unauthorized

Is your site suddenly asking for a username and password? Check right here whether it is locked for every visitor.

Checks the status code, every redirect, the variants with and without www and over http and https, the SSL certificate and the response time.

Free, no sign-up - no data about you is stored.

Technical finding without guarantee. The check runs once from a server in Germany. If your website is only unreachable from certain networks or countries, the result may differ.

What does Error 401 mean?

A 401 means this page requires you to log in and the request didn't include valid credentials. Despite the name "Unauthorized", it's really about missing authentication: the server doesn't know who you are. It sends a WWW-Authenticate header, and the browser then shows the familiar grey login prompt.

The difference to 403: with a 401 you could get in with the right credentials. With a 403 the server knows who you are (or doesn't care) and refuses access anyway.

Common causes.

  • Server-side password protection

    Directory protection via Basic Auth, set up with .htaccess and .htpasswd or in the hosting panel, locks the whole site or a folder.

  • Staging or test environment

    Test sites are protected on purpose so Google and strangers can't see them. When the staging copy goes live, the protection sometimes comes along.

  • Wrong or changed credentials

    The password was changed, saved incorrectly in the browser, or the user was deleted.

  • Protected admin area

    Some hosts and security plugins add an extra password prompt in front of wp-login.php or wp-admin.

  • APIs without a valid key

    APIs return 401 when a token or application password is missing, expired or wrong.

With WordPress and hosting.

On WordPress, a 401 for regular visitors almost always comes from the server, not from WordPress itself. A classic case is a staging site with directory protection that gets copied to the live domain via plugin or hosting tool, protection rules in .htaccess included. Suddenly every visitor sees a password prompt and Google only gets 401.

Via the REST API, WordPress returns 401 when a request needs authentication and has none. That affects apps, integrations with inventory or accounting systems, and the block editor when your session has expired. Some security plugins block the REST API for logged-out visitors entirely, which can break contact forms or third-party plugins.

How to fix it.

  1. Check whether it's everyone

    If the checker above returns 401, the site is protected for everyone. If it returns 200, it's your account or your browser.

  2. Check your credentials

    If you have them, enter them again and remove wrongly saved passwords in your browser. A private window helps because nothing is pre-filled there.

  3. Look for directory protection in the panel

    Hosting panels usually have an item like "Directory privacy" or "Password-protected directories". There you can see which folder is protected and remove the protection.

  4. Check the .htaccess

    If there is a .htaccess in the main directory or a subfolder with authentication settings pointing to an .htpasswd, that is where the protection comes from. Make a copy first, then remove only those lines.

  5. Check security plugins

    If only the login or the REST API is affected, look in your security plugin settings for login, XML-RPC or REST API protection.

Impact on Google.

Google can't see content behind a login. Pages returning 401 won't be indexed, and pages that were indexed drop out after a while. That's exactly right for a staging site, and a real problem for the live site that quickly shows in your traffic.

If the protection is removed quickly, Google usually picks the pages up again. You can speed this up by requesting indexing for your most important URLs in Search Console.

Good to know

Questions about Error 401?

The most common questions, answered briefly.

Questions about Error 401

What's the difference between 401 and 403?

401: you're not logged in, valid credentials would let you in. 403: access is forbidden, and logging in won't change that.

Where do I get the credentials?

From whoever looks after the site, or from the hosting panel where the directory protection was set up. If nobody is around anymore, the protection can be removed there too.

Should my staging site return a 401?

Yes, password protection is the most reliable way to keep test sites away from Google. Just make sure it doesn't get copied over when going live. That kind of process is part of my WordPress maintenance.

All status codes at a glance.

2xx: Success

  • 200OKAll good: the server understood the request and delivers the page.
  • 201CreatedThe request succeeded and created something new, for example a record via an API.
  • 204No ContentSuccessful, but the response has no body. Typical for APIs and background requests, not for regular pages.

3xx: Redirects

4xx: Client errors

5xx: Server errors

No status code: connection errors

New project?

Contact.

Tell me briefly about your project - I'll get back to you personally.

Your data is used solely to handle your inquiry. More in the privacy policy.