How to Quickly Fix the 401 Unauthorized Error (5 Methods) (2023)

Trying to access a WordPress site and being met with an error page is at best inconvenient, whether that site is yours or someone else’s. As with many HTTP response codes, part of what makes a 401 error so frustrating is the lack of information it offers for diagnosing and resolving the issue.

The 401 error can happen with any browser, so it’s a pretty common issue people face. In most cases, this problem is relatively simple and straightforward to fix.

In this post, we’ll explain what 401 error messages are and why they happen. Then, we’ll walk you through five methods you can use to fix them.

Let’s get started!

What is the 401 Error Code?

The Internet Engineering Task Force (IETF) defines the error 401 Unauthorized as:

The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource. The server generating a 401 response MUST send a WWW-Authenticate header field containing at least one challenge applicable to the target resource.

An Introduction to the 401 Error Code

HTTP 400 status codes are encountered when there is a problem making a request. A 401 error, in particular, happens when your browser denies you access to the page you’re trying to visit.

As a result, instead of loading the web page, the browser will load an error message. 401 errors can happen within any browser so the message appearing may differ.

For example, in Chrome or Edge, you’ll likely see a paper icon along with a simple message telling you that the page in question isn’t working. It will include the phrase “HTTP Error 401” at the bottom, and instruct you to contact the site’s owner if the problem persists:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (1)

At other times and in other browsers, you might get a slightly less friendly warning that’s just a blank page with a “401 Authorization Required” message:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (2)

Other variations include:

(Video) What is 401 Unauthorized error | Root cause and solution of Unauthorized issue | Common http code

  • “HTTP 401 Error – Unauthorized”
  • “401 Unauthorized”
  • “Access Denied”

These errors occur on websites that require a login in order to access them. In most cases, it means that something is either wrong with the credentials or with the browser’s ability to read them as valid.

This is similar to HTTP 403 Forbidden Error, in that access isn’t permitted to the user. However, unlike with the 403 error, the 401 error message indicates that the authentication process failed.

The code is sent via the WWW-Authenticate header, whichis responsible for identifying the authentication method used for granting access to a web page or resource.

What Causes a 401 Error?

If you encounter an error code in the 400s, you know you’re dealing with a client-side (or browser-side) issue. While the problem may be happening within your browser, however, it doesn’t necessarily alwaysmean that’s the culprit, which we’ll explain in more detail later.

401 errors occur on restricted resources, such as password-protected pages of your WordPress site. So it’s safe to assume that the cause of the problem has something to do with the authentication credentials.

Outdated Browser Cache and Cookies

One of the most common reasons you might experience a 401 error is that your browser’s cache and cookies are out of date, preventing the authorization from successfully going through. If your browser isn’t using the valid authentication credentials (or any at all), the server will reject the request.

Plugin Incompatibility

At other times, this error is caused by a plugin incompatibility or error. For example, a firewall or security plugin can mistake your login attempt as malicious activity, and return a 401 error to protect the page.

Incorrect URL or Outdated Link

It’s also possible that the source of the problem can be attributed to a minor mistake. Common culprits in this category include an incorrectly-typed URL or an outdated link.

How to Fix the 401 Error (5 Methods)

Now that we’ve gone through a bit of background on the 401 error, it’s time to discuss how you can resolve it.

Let’s take a look at five methods you can use:

1. Look for Errors in the URL

We’ll start off with the easiest potential fix: making sure you used the correct URL. This may sound simple, but 401 errors can sometimes appear if the URL wasn’t correctly entered in.

(Video) How to fix 'Unauthorized error 401' while opening Google form | Fix error 401 | 2022 | working 100%

Another possibility is that the link you used to visit the page in question points to the wrong URL. For example, it might be outdated, or leading to a page that no longer exists (and no redirects are in place).

Therefore, it’s worth double-checking the URL you used. If you typed it in yourself, verify that you spelled everything correctly. If you clicked on a link, confirm that it’s pointing to the page you’re trying to access (or try to visit that page directly through the website).

2. Clear Your Browser’s Cache

Your browser’s cache is designed to improve your online experience, by reducing page loading times. Unfortunately, sometimes it can also cause unwanted interruptions.

As we mentioned earlier, one of the common causes of the 401 error is outdated or incorrect cache data or cookies. Therefore, if you don’t notice any issues with the page’s URL, the next step is to clear your browser’s cache.

This will clean out any invalid information that’s locally stored in your browser, which could be interrupting the authentication process. Similarly, your browser’s cookies might contain authentication data that simply needs to be refreshed.

If you’re a Google Chrome user, you can do this by clicking on the menu icon in the top-right corner of the browser, and then going toSettings. Under thePrivacy and security section, click on Clear browsing data:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (3)

A new window will open. Under theBasictab, make sure all three boxes are selected, and then select Clear data:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (4)

This process will look a little different in other browsers. For example, in Mozilla Firefox, you would click on the library icon in the top-right corner of the browser, followed by History> Clear Recent History:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (5)

In the panel that opens next, selectEverythingin the drop-down menu at the top, make sure “Cache” is selected, and then click on the Clear Nowbutton:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (6)

If you’re using a different browser, please refer to this guide for clearing the cache

3. Flush Your DNS

Another method you can try to resolve the 401 error is flushing your Domain Name Server (DNS). While this is a rarer issue, it canbe a possible cause, so it’s worth giving it a try if the first two solutions don’t work.

(Video) How to solve 401 Unauthorized Exception in RestTemplate

To do this in Windows, click on the Start button and type cmd into the search bar. Hit Enter, and the Command Prompt will open. Copy and paste the command ipconfig/flushdns, and then hit Enteragain:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (7)

On a Mac, you can do this by going to Finder > Applications > Utilities > Terminal:

Input the command line sudo killall -HUP mDNSResponder and press Enter. Then, you can try refreshing the page you were trying to visit, to see if the 401 error has been resolved.

4. Deactivate Your WordPress Plugins

The problem causing your 401 error might not be due to your browser. If you’re having trouble accessing your WordPress site, it’s also possible that one or more plugins are to blame.

Some plugins, especially security-focused plugins, are configured to show a 401 error when they suspect suspicious login activity that might indicate an attack. Others might just be suffering from compatibility issues. Therefore, it’s a good idea to deactivate all of your WordPress plugins and see if that resolves the issue.

You can deactivate your plugins all at the same time in your dashboard, by going to Plugins > Installed Plugins. Check the box at the top to select all of them. Then under the Bulk Actionsdrop-down menu, select Deactivateand click on the Apply button:

After that, try reloading the page that returned the 401 error to see if this has resolved the issue. If it has, you can manually activate each plugin one at a time, in order to determine which one is causing the problem.

Then you can remove that plugin, replace it with a new one, or contact its developer for assistance.

5. Check the WWW-Authenticate Header Response

At this point, if the issue hasn’t been fixed, it may be caused by a server-side problem. This means our last fix will be a bit more involved.

As we saw earlier, the 401 response is sent through the WWW-Authenticate header, which appears as “WWW-Authenticate: <type> realm=<realm>”. It includes ‘challenges’, or strings of data that indicate what type of authentication is required in order for access to be granted.

In a nutshell, you’ll want to check and see if the header response was sent, and more specifically, what authentication scheme was used. At the very least, this can help narrow down the cause of the problem, and bring you one step closer to a solution.

(Video) 401 Unauthorized CPI Error in Postman SOAP UI || SAP CPI Iflow test

To do this, go to the web page that’s displaying the 401 error, and access the developer console in Chrome. You can right-click on the page and select Inspect, or use Ctrl+Shift+J.

Next, click on the Networktab and reload the page. This will generate a list of resources. Select theStatus header to sort the table and locate the 401 status code:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (10)

Select that entry, and then click on the Headerstab. Under Response Headers, locate the WWW-Authenticate header:

How to Quickly Fix the 401 Unauthorized Error (5 Methods) (11)

The information that is present in the response header, particularly the authentication schemes, can give you more information about what’s happening and point you towards a solution. It can help you understand what type of authentication the server is expecting.

For example, in the above example, we can see that the authentication scheme is “Basic”. This means the authentication request should only require an ID and password. For more detailed information and instructions on how to use this information, we recommend referring to the HTTP Authentication Scheme Registry.

Summary

When your browser and server have trouble communicating or authenticating requests, you’re sometimes forced to deal with errors such as the 401 error. While this problem is irritating, the message is usually temporary and fixable.

Here are five methods you can use to fix the 401 error:

  1. Look for errors in the URL.
  2. Clear your browser’s cache.
  3. Flush your DNS.
  4. Deactivate your WordPress plugins.
  5. Check the WWW-Authenticate header response.

Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275+ PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

FAQs

How do you remove 401 unauthorized access is denied due to invalid credentials? ›

In the Manager central pane, double-click the Authentication option under IIS block. In the Authentication list, enable either Windows Authentication option or Basic Authentication, and disable all other authentication options.

How do I fix request failed with HTTP status 401 unauthorized? ›

By default, the Web service client proxy does not inherit the credentials of the security context where the Web service client application is running. To resolve this problem, you must use the Credentials property of the Web service client proxy to set the security credentials for Web service client authentication.

What does 401 unauthorized access is denied due to invalid credentials mean? ›

401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied.

How do I fix unauthorized access? ›

5 Best Practices to Prevent Unauthorized Access
  1. Strong Password Policy. ...
  2. Two Factor Authentication (2FA) and Multifactor Authentication. ...
  3. Physical Security Practices. ...
  4. Monitoring User Activity. ...
  5. Endpoint Security.

What causes a 401 unauthorized error? ›

The HyperText Transfer Protocol (HTTP) 401 Unauthorized response status code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

How do I bypass Access Denied? ›

Right-click the file or folder, and then click Properties. Click the Security tab. Under Group or user names, click your name to see the permissions that you have. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.

Why does a link say unauthorized? ›

It means that the URL is non-existent, and the server may return a server error “401 Unauthorized Access”. Maybe you saved the page address in your browser, but the page address has been changed, or it has been deleted.

Why does it keep saying invalid credentials? ›

The error message 'Invalid credentials' is shown when one of your platforms has trouble connecting due to the provided credentials being incorrect. The error message comes from the ad platform directly, and not from Funnel, which means that you need to take action on this error message in order to get rid of it.

How do I fix access denied as administrator? ›

Folder Access Denied as Admin

Identify the folder and right-click on it. From the menu, tap “Properties” to open a new screen. Navigate to “Security,” then select the admin account. Check the “Permissions” section to ensure that all permissions have been granted.

What blocks unauthorized access to a network? ›

A firewall is a system designed to prevent unauthorized access to or from a private network. You can implement a firewall in either hardware or software form, or in a combination of both. Firewalls prevent unauthorized internet users from accessing private networks connected to the internet, especially intranets.

What prevents Unauthorised access to a website? ›

IP whitelisting helps limit and control access to only trusted users. It allows you to create a list of trusted and authorized IP addresses from which users can access your network.

What blocks Unauthorised access to a network? ›

A firewall is a system that is designed to protect your private network from unauthorised access. The firewall does so by filtering the information that comes in from the internet. With the information the firewall has available, it blocks unauthorised access and allows authorised access.

How to bypass system error 5 Access Denied? ›

If the command output results in “System error 5,” you must launch your preferred command-line interpreter as an administrator.
  1. Open Command Prompt as Administrator.
  2. Open Windows PowerShell as Administrator.
  3. Disable User Account Control Completely.
  4. Bypass UAC for Command Prompt and Windows PowerShell Only.
Feb 3, 2022

How do I fix access denied in command prompt? ›

  1. Start a Command Prompt as Administrator by right-clicking on the "Command Prompt" icon in the Windows Start Menu and choose "Run as administrator". Click Continue if you are presented with a confirmation popup message box.
  2. In the new command prompt, enter "net user administrator /active:yes".

How do I fix a corrupted link? ›

There are 4 ways to fix broken internal links:
  1. Is It A Typo? One common cause of broken internal links is typos. ...
  2. Make the Page Real Again. This is the best solution for fixing broken links in terms of SEO, especially if the missing page has backlinks pointing to it. ...
  3. Redirects. ...
  4. Delete the Broken Link.
Nov 2, 2022

Is unauthorized access a cyber crime? ›

Unauthorized Access is an offence punishable with penalty upto Rs. 1 Crore. It involves access or even touching any computer, computer system or computer resource without the consent of the authorized person incharge.

What links are suspicious? ›

Suspicious links

You can spot a suspicious link if the destination address doesn't match the context of the rest of the email. For example, if you receive an email from Netflix, you would expect the link to direct you towards an address that begins 'netflix.com'.

How do I restore my credentials? ›

Restore sign-in information using Credential Manager
  1. Open Control Panel.
  2. Click on User Accounts.
  3. Click on Credential Manager.
  4. Click the Windows Credentials tab.
  5. Click the Restore Credentials option.
  6. Click the Browse button.
  7. Select the . crd files with the backup information.
  8. Click the Open button.
May 12, 2022

Why does it say this account Cannot be accessed because the login credentials could not be verified? ›

What does this error message mean: "This account cannot be accessed because the login credentials could not be verified"? This usually means that the private key used to sign the SAMLResponse does not match the public key certificate that Google Workspace has on file.

Why are my login credentials locked out? ›

When a user account becomes locked out, the cause is often attributed to a user who has simply entered an old or incorrect password too many times.

How do I get administrator permission? ›

Command Prompt
  1. Open the Start menu.
  2. Type "cmd" without quotation marks into the search bar at the bottom of the Start menu.
  3. Right-click "cmd.exe" in the list of search results and select "Run As Administrator."
  4. Type the phrase "net user administrator /active:yes" without the quotation marks at the command prompt.

How do I enable administrator permission? ›

Using a command prompt

Open “Run” with [Windows] + [R]. Type “cmd” and press [Ctrl] + [Shift] + [Enter]. Type “net user administrator /active:yes”. The administrator account is now activated.

How do I run in administrator mode? ›

Press and hold down the SHIFT key while you right-click the executable file or the icon for the application, and then select Run as. Select The following user. In the User name and Password boxes, type the administrator account and password, and then select OK.

What does Error Code 401 mean on Firestick? ›

The 401 Unauthorized Error is an HTTP status code error that represented the request sent by the client to the server that lacks valid authentication credentials.

Why does Google keep saying access denied? ›

Clear Cookies and Cache

As we have mentioned, the "Google Drive access denied" error stems from the browser storing credentials of different accounts logged in simultaneously. Hence, cleaning our web browsing history will suffice.

How do you reset a frozen FireStick? ›

Press and hold Back and right side of the navigation circle together for 10 seconds. On the TV screen, choose to continue or cancel the factory reset. If you don't choose, the device resets automatically after several more seconds.

How do I fix my Amazon FireStick connection problem? ›

Can't Connect Your Fire TV Device to Wi-Fi
  1. Restart your Fire TV device: unplug the power adapter, wait 1 minute, and then plug it back in.
  2. Check the network status on your Fire TV device: ...
  3. If you're not connected or don't see your network name, scroll down to Wi-Fi.

How do I fix error on FireStick? ›

If you are seeing this messaging, it is recommended to clear your app's data and cache:
  1. From your device's Home screen, select Settings.
  2. Select Applications, then "Manage All Installed Applications"
  3. Select the app where you are seeing the error message.
  4. Select both "Clear data" and "Clear cache"

Videos

1. How To Fix VLC Error Code 401 Unauthorized (200) | How To Find Subtitle In VLC Player
(Windows 10 Tutorial)
2. Sending Proper 401 Unauthorized Response | JWT authentication | Spring boot tutorial [Hindi]
(Learn Code With Durgesh)
3. What is 401 Error and How to Fix it
(ThemeIsle: WordPress Tutorials & Reviews)
4. Fix VLC error code '401 unauthorized' (200) || Simple steps 2020 ||
(sandeep kumar)
5. Unauthorized Error 401 During Office 365 Migration: How to Resolve?
(Kernel Data Recovery)
6. What is a 401 Error and How Do You Fix It?
(Elegant Themes)
Top Articles
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated: 03/19/2023

Views: 6460

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.