More
More
407 Proxy Authentication Required
Like 401, but the proxy in between needs the login.
- Code
407- Reason phrase
- Proxy Authentication Required
- Class
- 4xx Client error
- Defined in
- RFC 9110 section 15.5.8
- Cacheable by default
- No
What it means
Client error: the problem lies with the request. Repeating it unchanged will normally fail again.
Common causes. A corporate proxy that needs your credentials.
What to do. Configure the proxy username and password in the browser or tool.
How clients and crawlers treat it
Google Search. Like every 4xx except 429, it tells Google the content does not exist: an indexed URL is removed from the index, and a new one is not processed. Crawl frequency for the URL gradually drops. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.
Caching. Not cacheable by default (RFC 9110 section 15.1 does not list it). A cache stores it only when the response says so with Cache-Control or Expires.
Example response
HTTP/1.1 407 Proxy Authentication Required Proxy-Authenticate: Basic realm="proxy" Proxy Authentication Required
How to send 407
location /example {
return 407;
}
RewriteEngine On RewriteRule ^example$ - [R=407,L]
http_response_code(407); echo 'Proxy Authentication Required'; exit;
res.writeHead(407, { 'Content-Type': 'text/plain' });
res.end('Proxy Authentication Required');
# in a view function return 'Proxy Authentication Required', 407
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 406Not AcceptableThe server cannot produce a response in any format the client's Accept headers allow.
- 408Request TimeoutThe server gave up waiting for the client to finish sending the request.
- 405Method Not AllowedThe address exists but does not accept this method, such as POST where only GET works.
- 409ConflictThe request conflicts with the current state of the resource.
All status codes · All 4xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.