The “401 Unauthorized Error” is a standard HTTP response status code that indicates that a request sent to a server cannot be completed because it lacks valid authentication credentials. This error occurs when either no authentication is provided or the provided credentials are not valid or sufficient to access the resource. It’s essentially the server’s way of saying “You need to log in to see this” or “You don’t have permission to access this without proper authentication.” This error prompts the user to provide the necessary credentials, and if provided correctly, the server allows access to the requested resource.
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:
- Look for errors in the URL
- Clear your browser’s cache
- Flush your DNS
- Deactivate your WordPress plugins
- Check the WWW-Authenticate header response
1. Look for errors in the URL
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.
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 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 to Settings. Under the Privacy and security section, click on Clear browsing data:
The Clear browsing data section in Google Chrome
A new window will open. Under the Basic tab, make sure all three boxes are selected, and then select Clear data:
The clear browsing data window in Chrome
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:
The ‘clear recent history’ option in Firefox settings
In the panel that opens next, select Everything in the drop-down menu at the top, make sure Cache is selected, and then click on the Clear Now button:
The ‘Clear History’ panel in Firefox
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 rare issue, it can be a possible cause, so it’s worth giving it a try if the first two solutions don’t work.
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 Enter again:
The Command Prompt interface in Windows
On a Mac, you can do this by going to Finder > Applications > Utilities > Terminal:
The Terminal application on Mac
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 Actions drop-down menu, select Deactivate and click on the Apply button:
The plugin deactivation setting in the WordPress dashboard
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 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.
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 Network tab and reload the page. This will generate a list of resources. Select the Status header to sort the table and locate the 401 status code:
The 401 status code in the developer console in Chrome
Select that entry, and then click on the Headers tab. Under Response Headers, locate the WWW-Authenticate header:
The Response Headers section of the developer console
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.
For Additional Support
Click www.AZDSSupport.com and complete the Support Request Form*.
- Your email address—a support agent will reply via email.
- Subject—Provide the property name and issue title.
- Description—describe the issue in detail.
- Priority—accurately* indicate the level of the request (low, normal, high or urgent). *Selecting the correct priority level ensures the request is routed to the correct agent.
- My request is for the following— indicate the request is for Booking Engine (RevRaise).
- Attachments (if applicable)—attach relevant docs/images.
- Click Submit.
Zendesk will generate a ticket number. To check the status of the ticket, click My requests and enter the ticket number in the Search field on the left side of the screen.