{ }HttpStatus.com

305 Use Proxy

Deprecated: the requested resource must be accessed through the proxy given by the Location header.

Defined in RFC 9110 §15.4.6 · deprecated / reserved

What 305 means

A 305 response was originally defined to indicate that the requested resource must be accessed through the proxy given by the Location header, rather than directly from the origin server. The idea was to let a server instruct a client to route future requests for a resource through a specific proxy, for example to enforce caching policy or load distribution controlled by the origin rather than by client configuration.

RFC 9110 formally deprecates 305 and instructs that it must not be generated by servers, citing security concerns: the mechanism could be abused to trick a client into routing its traffic, potentially including credentials and other sensitive request data, through an arbitrary third-party proxy specified by whatever server the client happened to talk to first. Because the redirect target was fully server-controlled and largely opaque to the user, it was a poor fit for the trust model of the web.

Most major browsers never fully implemented 305 in the first place, and the ones that did have since removed or ignored it, which compounded the security concern with a practical interoperability problem: server operators could not rely on client support even before the formal deprecation. Today 305 exists in the spec purely as a historical artifact and a reserved code that must not be used in new implementations.

If you see 305 in the wild, it is almost always either a misconfigured legacy system, a deliberately crafted test case, or, occasionally, a status code reused informally for an unrelated purpose by a non-compliant server. There is no forward-looking use case for emitting it.

Common causes

  • A legacy or poorly maintained server implementation still emits 305 from old code paths.
  • A misconfigured proxy or gateway generates 305 attempting to force traffic through itself.
  • Test or fuzzing tools deliberately send 305 to probe client error handling.
  • A non-compliant server reuses the status code informally, unrelated to its original proxy-redirect meaning.

How to fix a 305

If you are the client (browser user or API caller)

  • Ignore or reject 305 responses; do not implement automatic following of the Location as a proxy target, since modern clients and specs both discourage this.
  • Treat receipt of 305 as a signal to investigate the server, since a compliant, up-to-date server should never send it.
  • If a library or SDK exposes an option to auto-follow 305 like a proxy redirect, leave it disabled.

If you run the server

  • Remove any code path that emits 305; it must not be generated per RFC 9110.
  • If the goal is to route clients through a specific proxy, configure that at the network or DNS layer instead of via an HTTP redirect.
  • Audit legacy systems for lingering 305 usage during modernization or migration work.

Example

GET /internal-report HTTP/1.1
Host: legacy.example.com

HTTP/1.1 305 Use Proxy
Location: http://proxy.example.com:8080/internal-report
Deprecated usage: instructing a client to fetch the resource via a specified proxy.

Try it live

Our free status responder returns a real HTTP 305 you can point tests, monitors or a browser at.

GET https://mcp.httpstatus.com/status/305

Related status codes

Tools for debugging this