18 March, 2023

What is a 401 error? Causes and how to fix 401 Unauthorized

Quick summary: A 401 error (401 Unauthorized Error) is an HTTP status code that means the user does not have permission to access the requested resource, usually because credentials such as the username, password or token are missing or wrong. The website exists, but the server refuses to load the page because it cannot verify a valid user identity.

What is a 401 error? It is one of the more common errors you meet when using a website, and it tends to be frustrating and gives users a poor experience. The following article from MONA Media will help you understand this error, along with its causes and how to fix a 401 Unauthorized error quickly and simply.

What is a 401 error?

What is a 401 error?

The 401 error (401 Unauthorized Error) is an HTTP status code. It is like a website that exists but that you cannot enter because you lack permission. Here, permission means a valid user ID with a valid password.

A website only loads once a user has logged in with a valid account. If you log in and get a 401 status error, your login details are certainly invalid. Like a 403 error or a 500 error, the 401 error code is usually shown in the browser window.

Example: In Chrome or Edge, you may see a paper icon with a simple message telling you the page is not working. At the bottom it includes the phrase “HTTP ERROR 401” and tells you to contact the site owner if the problem continues.

Other ways a 401 error is commonly displayed include:

  • 401 Unauthorized
  • Authorization Required
  • HTTP Error 401 – Unauthorized
  • …

Causes of a 401 Unauthorized error

Invalid credentials

One of the most common reasons for a 401 error is that your credentials are wrong. When you visit a page that requires authentication, such as a login, password or token, and those details are incorrect or have expired, the server returns a 401 error.

Restricted access rights

If the user has not been granted access to the requested resource, the server also refuses and returns a 401 error.

Account locked or disabled

If an administrator has locked or disabled the user's account, the user has no access and gets a 401 Unauthorized error.

One reason you might see a 401 error is that the cache and cookies in your browser are out of date. This blocks the authorization process: if the browser does not send valid credentials, the server refuses access.

Incompatible plugins

According to Võ Nguyên Thoại, Chief Technology Officer at MONA Host, this error can happen because of plugin incompatibility. For example, your website security plugin may treat your login attempt as a threat and return a 401 error to protect the site.

Network problems

Sometimes a 401 error also appears when there are problems with the network connection or an unstable server connection.

The quickest and simplest ways to fix a 401 Unauthorized error

Reload the page when you get a 401 Unauthorized error

The simplest fix for a 401 Unauthorized error is to reload the page. This works when you simply typed the wrong login details. If you forgot your password, follow the steps to recover it.

How to fix a 401 error

Check the URL

Make sure you typed it correctly. A 401 error can appear when the URL is wrong. It is also possible that the link you used points to the wrong URL, or For example: that the URL is outdated or leads to a page that no longer exists.

Clear the cache

This works on the same principle as reloading the page. In earlier logins the cache may have stored wrong details from a mistyped entry, which causes the 401 status error. Clear the cache and log in again with the correct account to fix the 401 error easily.

See how to clear the cache in every browser HERE!

Deactivate WordPress plugins

A 401 error may not come from your browser at all. One or more plugins can cause it. Some security plugins are set up to show a 401 unauthorized error when they detect suspicious login activity that could harm the website. So you can deactivate your WordPress plugin and see whether the problem is solved.

  • Võ Nguyên Thoại – Co-founder/CTO of Mona Host

You can deactivate all plugins by going to Plugins -> Installed Plugins, opening the Bulk Actions drop-down menu, choosing Deactivate and clicking Apply:

Fix a 401 error code by deactivating plugins

Then reload the page that showed the 401 error to see if it is gone. If it is, you can reactivate the plugins one by one to find which one causes the problem. You can then delete that plugin and replace it with another, or contact the plugin developer for help.

Contact the administrator when a 401 error appears

When a 401 error appears on a site that does not ask for any login, contact the administrator and report the error, because the cause is very likely a code problem.

Besides the suggestions above, you can also fix a 401 error quickly in IIS Manager by following these steps in order:

  • Step 1: Open IIS Manager -> click Sites -> click Website
  • Step 2: Double-click “Authentication” -> choose Anonymous Authentication
  • Step 3: In the Actions panel -> click Edit
  • Step 4: Choose Application pool Identity -> click OK

As you can see, a 401 Unauthorized error causes a lot of trouble for users of a website. We hope what Agency SEO MONA Media has shared answers your question “what is a 401 error” and shows you the simplest ways to fix it.

However, you cannot always fix website errors yourself. If you run into other errors that interrupt your website, the cause may be in the code, or it may be an error that ordinary methods cannot fix.

When that happens, do not hesitate to contact MONA. We offer hosting migration to MONA.HOST and a highly skilled team who are ready to fix any technical problem with your website.

For details, contact us at:

See more errors similar to the 401 error:

FAQ

What causes a 401 Unauthorized error?
A 401 error is usually caused by invalid or expired login details, a locked account, outdated browser cache or cookies, a security plugin blocking you by mistake, or access rights restricted by the administrator.
How do you fix a 401 Unauthorized error?
Try reloading the page, checking the URL, and clearing your browser cache and cookies before logging in again. You can also deactivate your WordPress security plugins to find out which one is causing the conflict. If you cannot fix it yourself, contact the website administrator for help.
About The MONA Group: Founded in 2016, with more than 200 staff, MONA has delivered 14,000+ projects with an 85% client retention rate. MONA provides website design, full-scope SEO, custom software and AI automation solutions for businesses. Consulting hotline: 1900 636 648. Explore MONA AI Agent suite and MONA SEO services.
MONA has a podcast: listen instead of readingEpisodes on AI, automation & SEO for Vietnamese businesses
Nghe ngay
About the author

CEO & Founder · The MONA

Founder of The MONA, who built a services company of 200+ staff with 14,000+ projects delivered. Khánh Hùng shares how he thinks about building systems that run themselves, automating a business, and the real lessons from delivering projects at MONA.

Views 1,6K
Rate this article 4,6/5 · 16 ratings

Professional website
design services

Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA will never sell your information or send you spam

    NHẬN TƯ VẤN SEO MIỄN PHÍ !

    Đội MONA tư vấn hệ thống quản lý giáo dục trực tuyến
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00