Qaynaq LABS · TOOLS

HTTP · 3xx Redirection

305 Use Proxy

Client must use the specified proxy to access the requested resource.

When you see this status

  • Server enforces proxy usage for security or policy reasons
  • Client initially accessed resource without proxy but server requires it
  • Proxy configuration changes mid-session requiring re-routing

Common causes

  • Server policy mandates proxy use for all requests
  • Misconfigured proxy settings on client or server
  • Network topology changes requiring proxy redirection

How to debug it

  1. Verify proxy URL in Location header is correct and reachable
  2. Check server logs for proxy enforcement policy
  3. Test direct access to resource without proxy
  4. Inspect client proxy configuration settings

Return this code in your framework

Express (Node.js)
res.status(305).set('Location', 'http://proxy.example.com').send();
FastAPI (Python)
from fastapi import Response
return Response(status_code=305, headers={"Location": "http://proxy.example.com"})
NestJS
@Get() getResource() { return { statusCode: 305, headers: { Location: 'http://proxy.example.com' }}; }
Go (net/http)
http.Redirect(w, r, "http://proxy.example.com", 305)

About HTTP 305

HTTP status code 305 Use Proxy is part of the 3xx Redirection family. Client must use the specified proxy to access the requested resource. Understanding it is essential for backend engineers, API designers, and anyone debugging integrations between services.

The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance: what triggers them, how to debug them in production, and exactly how to return them from common frameworks. Each code page is hand-curated and verified.

Frequently asked

Why use 305 instead of 302 for proxy redirection?

305 explicitly mandates proxy use, while 302 is a generic temporary redirect. 305 is rarely used in practice.

Can browsers handle 305 responses automatically?

No. Browsers do not automatically follow 305 responses due to security risks. Manual intervention is required.

Is 305 deprecated or obsolete?

No, but it is rarely implemented. RFC 7231 discourages its use due to security concerns with proxy handling.