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
- Verify proxy URL in Location header is correct and reachable
- Check server logs for proxy enforcement policy
- Test direct access to resource without proxy
- 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.