Crypto
15 Nov 2025
Read 7 min
401 Unauthorized error: what it means and how to fix it *
401 unauthorized error troubleshooting guide helps you pinpoint causes fast and restore access now.
You open a page, an app or a download link and get “401 Unauthorized”, “HTTP 401” or “Error 401” instead. The server is telling you it does not know who you are, or that your login is no longer valid. In most cases you can fix it in a minute. Here is what the error means, what to try as a user and what to check if you run the site or the API.
In short
- 401 means: login or access key missing, wrong or expired. The server wants you to identify yourself first.
- As a user: log out and in again, start the download from the page instead of an old link, delete the site’s cookies, check your device’s date and time.
- As a developer: check that the Authorization header is sent, the token is valid and not expired, and that no proxy strips the header.
- 401 is not 403: with 403 the server knows you but does not allow access.
What “401 Unauthorized” means
Status code 401 says the request lacks valid credentials. The name is a little misleading: it is about authentication (who are you?), not about permissions. Typical causes are an expired session, a wrong password, an API key that was changed, or a link with a built-in access token that has run out. The server usually sends a header called WWW-Authenticate along with the error that says which login method it expects.
| 401 Unauthorized | 403 Forbidden | |
|---|---|---|
| Question | Who are you? | You are known, but not allowed |
| Typical cause | Not logged in, session or token expired | Missing rights, IP or region blocked |
| Does logging in help? | Usually yes | Usually no |
How to fix 401 as a user
- Log out and log in again. Sessions expire. A fresh login creates new cookies and tokens.
- Check the account. Password managers sometimes fill in an old password or the wrong account. Type it by hand once.
- Start downloads from the page. Download links often contain a key that is only valid for a short time. If you saved or shared the link, it may have expired. Go back to the page and click the download again. Messages like “Download failed: Unauthorized” or “blocked because of an unauthorized request (401)” usually mean exactly this.
- Delete the cookies of this one site and log in again. Old login cookies can collide with new ones.
- Check date and time on your device. If the clock is far off, many logins and tokens fail. Set the time to automatic.
- Try a private window or another browser. If it works there, an extension or stored data is in the way.
- Contact the provider if nothing helps. Your account may be locked or the service may have a problem.
How to fix 401 as a site owner or developer
Look at the request in the browser’s developer tools (Network tab) or in your API client and compare it with what the server expects.
| Finding | Typical cause | Fix |
|---|---|---|
| No Authorization header in the request | Client forgets to send it, or a CORS request runs without credentials | Send “Authorization: Bearer <token>” or the expected scheme; for cookies use credentials: “include” |
| Header sent, server still says 401 | Token expired, revoked or from the wrong environment (test key on live system) | Refresh the token, check expiry and environment, generate a new key |
| Works locally, fails on the server | Apache with PHP over FastCGI or CGI drops the Authorization header | Pass the header through (for example CGIPassAuth On in Apache) and test again |
| Wrong scheme | Basic sent where Bearer is expected, or the other way round | Read the WWW-Authenticate header of the answer and use that scheme |
| 401 only sometimes | Clocks out of sync, tokens seen as not yet valid or already expired | Sync server time (NTP), allow a small tolerance for token times |
For WordPress: if the REST API answers 401 with a correct application password, the cause is very often the stripped Authorization header described in the table.
Our take
401 sounds like a door that is locked for good, but most of the time it only means “show your ticket again”. As a user, a fresh login and a fresh download link solve the large majority of cases. If you build the system, the error is a gift: it tells you exactly where to look. Check whether the header arrives, whether the token is still valid and whether something between client and server swallows it. That covers almost every 401 we have seen.
FAQ
Keep reading, keep building
Three things from our own workshop that fit this topic:
- Diktly Free is our dictation app for Mac: speech becomes text entirely on your own machine, nothing goes to the cloud. Free version, Basic 14.99 €.
- 1000+ Prompts to Level Up Your Life is our most downloaded pack. Pay what you want, including 0.
- OpenAI Agent Mode for Beginners walks you through letting AI agents handle tasks for you. 19.99 $.
Our own products. Tech Moments is our newsletter on AI and tech in plain language, one email, no noise. Subscribe below.
* The information provided on this website is based solely on my personal experience, research and technical knowledge. This content should not be construed as investment advice or a recommendation. Any investment decision must be made on the basis of your own independent judgement.
Contents





