Error HTTP 401 Authorization Required: Causes and Solutions

Error 401 Unauthorized

Last update:

If you’ve encountered the 401 Authorization Required or 401 Unauthorized error messages and are seeking clarity and solutions, you’re in the right place. Dive in as we clearly explain the HTTP 401 error, uncover its primary causes, and arm you with practical solutions to get you back on track. Whether you’re a casual browser or a website administrator, this guide is all you need.

Table of Contents

What is the 401 Unauthorized Request error?

The 401 HTTP is a client-side standard response status code. This error response indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

For instance, you get this HTTP 401 error code when you are trying to access a password protected page. You can also get this 401 error if your credentials expired.

Different 401 error messages depending on the server

  • “401 Unauthorized”
  • “401 Authorization Required”
  • “Access Denied”
  • “HTTP 401 Error – Unauthorized”
  • “This page isn’t working – If the problem continues, contact the site owner. – HTTP ERROR 401”

For example, in Chrome browser, you’ll likely see a simple message telling you that “This page isn’t working”, like this one:

This page isn't working - If the problem continues, contact the site owner. - HTTP ERROR 401

Sometimes, the server replies with a standardized error page, e.g. the Nginx 401 Authorization Required:

401 Authorization Required nginx

You can also find personalized 401 Error pages. The following is an example of our wetopi customized 401 Unauthorized error response, when accessing a site with “Restrict access” enabled.

HTTP 401 unauthorized error code personalized

401 Unauthorized vs 403 Forbidden

The 401 error is similar to the “HTTP Error 403 Forbidden“. We get the 403 when we have valid credentials (or don’t need them) but access to the resource isn’t permitted (in other words, you are trying to access a private or restricted resource the server will never give you, no matter what).

On the other hand, we get the 401 status code when the resource is available, but we don’t provide, or don’t have, valid credentials.

How to fix the 401 Unauthorized Request error

To identify, and fix the error causing your 401 Unauthorized HTTP error code, we give you a list of causes and their solution. Follow the tips on the list until you find the solution:

  1. Look for errors in the URL. An incorrectly-typed URL or an outdated link could be the cause.
  2. If your request is private, a password-protected page. Then double-check whether you’re logged in with a valid username and password. If you’re sure that you have entered the credentials correctly, try Logging out and Logging in again. If the error persists, try changing the password.
  3. Open the URL in an Incognito Browser Window. If you get access in Incognito, it means that the reason you get a 401 error is that your browser’s cache and cookies are out of date.
  4. A configuration problem on the website. If you are a webmaster and you are running a WordPress site: try to disable the plugins one by one. Pay special attention to the plugins related to security management and resource protection.
  5. Some web providers issue the HTTP 401 when a domain is pointing to the wrong server. If you are a webmaster, double-check the DNS Records (also named DNS Zones). The IP addresses of your site’s DNS Records could be pointing to the wrong server.
  6. Your computer’s DNS cache contains invalid zones. An outdated, or corrupted DNS cache in your computer is not a common cause of the “401 Unauthorized HTTP Error”. Nonetheless, it is worth considering flushing your device’s DNS cache.

Don’t you have an account on Wetopi?

Free full performance servers for your development and test.
No credit card required.

All HTTP Status Codes

200 OK

201 Created

202 Accepted

203 Non-Authoritative Information

204 No Content

205 Reset Content

206 Partial Content

207 Multi-Status

208 Already Reported

226 IM Used

300 Multiple Choices

301 Moved Permanently

302 Found

303 See Other

304 Not Modified

305 Use Proxy

307 Temporary Redirect

308 Permanent Redirect

400 Bad Request

401 Unauthorized

402 Payment Required

403 Forbidden

404 Not Found

405 Method Not Allowed

406 Not Acceptable

407 Proxy Authentication Required

408 Request Timeout

409 Conflict

410 Gone

411 Length Required

412 Precondition Failed

413 Payload Too Large

414 Request-URI Too Long

415 Unsupported Media Type

416 Requested Range Not Satisfiable

417 Expectation Failed

418 I’m A Teapot

421 Misdirected Request

422 Unprocessable Entity

423 Locked

424 Failed Dependency

426 Upgrade Required

428 Precondition Required

429 Too Many Requests

431 Request Header Fields Too Large

444 Connection Closed Without Response

451 Unavailable For Legal Reasons

499 Client Closed Request

500 Internal Server Error

501 Not Implemented

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout

505 HTTP Version Not Supported

506 Variant Also Negotiates

507 Insufficient Storage

508 Loop Detected

510 Not Extended

511 Network Authentication Required

599 Network Connect Timeout Error

See how Wetopi stacks up against your current hosting

Try before you buy.

With no obligation on your part, we’ll migrate a copy of your website:

No hidden small text.
No commitments.
No credit card.