401 Unauthorized
- Who wants credentials
- The server hosting the resource
- Challenge header
- WWW-Authenticate
- Credentials header
- Authorization
A 407 means a proxy between you and the server needs credentials. See the Proxy-Authenticate challenge, how to send Proxy-Authorization and what to check.
HTTP 407 Proxy Authentication Required means the request did not succeed because it lacks valid credentials for a proxy server sitting between the client and the server. The proxy sends a Proxy-Authenticate header. Fix it by sending valid credentials in a Proxy-Authorization header, or by correcting the proxy settings and username and password on the client.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
MDN states the same idea from the client's side: the request did not succeed because it lacks valid authentication credentials for the proxy server that sits between the client and the server with access to the requested resource.
HTTP/1.1 407 Proxy Authentication Required
Date: Wed, 21 Oct 2015 07:28:00 GMT
Proxy-Authenticate: Basic realm="Access to internal site"MDN's authentication guide notes that resource authentication and proxy authentication can coexist, which is why a separate set of headers and status codes exists. See 401 Unauthorized for the server version and 403 Forbidden for a refusal.
# Credentials in the proxy option
curl -i -x http://proxy.example.com:3128 \
--proxy-user username:password https://example.com/
# Or set the header yourself (Basic value is base64 of username:password)
curl -i -x http://proxy.example.com:3128 \
-H "Proxy-Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" https://example.com/| Cause | How to spot it | Fix |
|---|---|---|
| No proxy credentials sent | 407 with a Proxy-Authenticate challenge on the first request | Add credentials for the named scheme |
| Wrong or expired proxy password | 407 repeats after sending credentials | Update the stored username and password |
| Credentials in the wrong header | Sent Authorization instead of Proxy-Authorization | Use Proxy-Authorization for the proxy |
| Scheme mismatch | Challenge says one scheme and you sent another | Match the challenge |
| Proxy settings point at the wrong proxy | Address or port isn't the one issued to you | Correct the proxy host and port |
Read the response headers. A 407 carries Proxy-Authenticate, not WWW-Authenticate. Note the scheme and realm in the challenge.
Use the scheme the proxy named. The header form is Proxy-Authorization: <type> <credentials>, and MDN's guide uses Basic as the most common scheme.
Configure the credentials in the HTTP library or environment, not in the Authorization header, which is for the destination server.
Repeat the same request and check you get the destination's response, not another 407.
4 questions people ask next, answered from the sources on this page.
Supply valid credentials to the proxy. The client may repeat the request with a new or replaced Proxy-Authorization header. On a device, check the proxy address, port, username and password in your proxy settings.
A proxy between you and the site is asking you to authenticate and didn't receive valid credentials. It sent a Proxy-Authenticate header describing how to do it.
407 is similar to 401 but concerns authenticating with a proxy rather than the destination server. The challenge is Proxy-Authenticate and the answer goes in Proxy-Authorization, instead of WWW-Authenticate and Authorization.
No. Cloudflare says it does not generate 407 errors but proxies them from the origin server or an upstream proxy. Check the origin's proxy configuration.
Run the free audit, then approve the fixes. Every change can be undone.