What it means
A 401 Unauthorized error means the page needs you to prove who you are, and the server did not get valid login details. You either are not signed in, typed the wrong username or password, or your saved session expired. It is often fixable by the visitor by signing in again, but if correct details keep failing, the site owner needs to check its login setup.
Common causes
- You are not signed in, or your session expired
- Wrong username or password, or Caps Lock is on
- Old or corrupted login cookies for that site
- An outdated bookmark to a members-only or admin page
- A password-protected folder on the server
- On the site's side, a broken login plugin, expired API key or wrong authentication settings
How to fix it
Work down the list. Each fix is safe to try before moving on to the next.
FIX 01Check the address and sign inEASY
- Check the URL is correct and not an old bookmark.
- Go to the site's home page and use its
Sign inorLog inlink. - Check that Caps Lock is off and that you are using the right account.
Why it helps: A 401 most often just means the server has not received valid login details.
FIX 02Reset your passwordEASY
- On the sign-in page, choose the site's
Forgot passwordoption. - Follow the email link to set a new password.
- Sign in with the new password.
Why it helps: If your saved password is outdated, a reset gives you working details.
FIX 03Delete the site's cookies and sign in againEASY
- In Chrome, open the three-dot menu and choose
Settings. - Go to
Privacy and security > Third-party cookies > See all site data and permissions. - Search for the site, click the trash icon and confirm with
Delete. - Reload the page and sign in again.
Why it helps: An expired or corrupted session cookie can keep sending login details the server rejects.
FIX 04Try a private window or another browserEASY
- Open an Incognito window with
Ctrl + Shift + Non Windows orCommand + Shift + Non a Mac. - Go to the site and sign in there.
- If it works, remove the site's saved data in your normal browser and turn off extensions one at a time to find a conflict.
Why it helps: This rules out stored data and extensions in your usual browser profile.
FIX 05Contact the siteEASY
- If correct details fail in every browser, contact the site's support.
- Tell them the page address, the time and that you received a 401 error.
Why it helps: Your account may be locked or the site's login system may be broken.
// RUN THIS SITE? FIXES FOR SITE OWNERS
FIX 06Check password-protected foldersMEDIUMSITE OWNERS
- In cPanel, open
Directory Privacyand see whether the folder is password protected. - Check
.htaccessin that folder and its parents forAuthTypeandRequirelines you did not expect. - Make sure the password file named by
AuthUserFileexists and contains the user. - Remove or update the protection if it was added by mistake, for example on wp-admin by a security tool.
Why it helps: Server-level password protection sends a 401 before your site's own login ever runs.
FIX 07Test login plugins and security rulesMEDIUMSITE OWNERS
- Check your server error log at the time of the 401.
- On WordPress, temporarily disable security, login or membership plugins by renaming their folders in
wp-content/plugins. - Test the login again, then restore the folders one at a time to find the cause.
- Check firewall or CDN rules that may require authentication on certain paths.
Why it helps: A misconfigured plugin or rule can reject valid logins.
FIX 08Check API keys and IIS authenticationADVANCEDSITE OWNERS
- For APIs, confirm the token or key has not expired and is sent in the
Authorizationheader in the format the server expects. - Look at the
WWW-Authenticateheader in the 401 response to see which authentication scheme the server wants. - On IIS, open the page in a browser on the server itself to see the detailed error with its substatus code (401.1 to 401.5 are not written to the IIS log): 401.1 means bad credentials, 401.2 means server authentication settings, and 401.3 means file or folder permissions.
- In IIS Manager, open
Authenticationfor the site and make sure the intended methods are enabled.
Why it helps: The response headers and IIS substatus codes point straight to which part of authentication failed.
Check it's fixed
- You can sign in and reach the page you wanted.
- The page still loads after closing and reopening the browser.
- API requests return a 2xx status with the current token.
When to get help
If correct details fail everywhere, contact the site, since your account may be locked. Site owners who cannot find the cause should contact their host or the developer of the login or security plugin.
Questions
What is the difference between 401 and 403?
A 401 means the server does not know who you are yet, so signing in may fix it. A 403 Forbidden means it knows who you are but you do not have permission, and signing in again will not help.
Why does a sign-in box pop up before the page?
The folder is protected by the web server itself. You need the separate username and password set up for it, not your normal site account.
Is a 401 a problem with my internet connection?
No. Your connection reached the site fine; the site simply did not accept your login details for that page.
Related fixes
Still stuck?
Paste the exact message and the repair bot will find the closest fix, or search it on Google, Microsoft, Apple, Reddit and YouTube.