Skip to content

305 Use Proxy — Meaning, Common Causes & How to Fix

305 3xx Redirection RFC 9110 §15.4.6

305 Use Proxy means: A deprecated redirect that instructed the client to retry the request through the proxy named in Location. It was defined in early HTTP specifications and is deprecated in RFC 9110 due to security concerns; modern clients do not honor it. Redirection 3xx codes tell the client the resource lives elsewhere, or that a cached copy is still valid. The family splits along two axes: permanent versus temporary, and method-preserving versus method-rewriting. Picking the wrong member causes duplicate submissions, lost POST bodies or stale SEO signals. In practice you will meet 305 when a legacy server or appliance emits 305 from old http/1.1-era code; an outdated proxy configuration tries to force proxy usage; a security scanner probes how clients handle deprecated redirects. On the client side, ignore or reject 305; do not switch proxies based on a response header — that is a traffic-interception risk. On the server side, never emit 305. Use explicit proxy configuration (PAC files, environment variables) instead of in-band proxy redirects.

Advertisement
Ad slot · ref-top

When 305 happens

  • A legacy server or appliance emits 305 from old HTTP/1.1-era code
  • An outdated proxy configuration tries to force proxy usage
  • A security scanner probes how clients handle deprecated redirects

How to fix it

On the client

Ignore or reject 305; do not switch proxies based on a response header — that is a traffic-interception risk.

On the server

Never emit 305. Use explicit proxy configuration (PAC files, environment variables) instead of in-band proxy redirects.

Should you retry?

Follow the redirect (or reuse the cache for 304); update references if permanent.

Debugging steps

When 305 appears unexpectedly, start by capturing the full exchange: 'curl -i' or the browser DevTools Network tab shows the exact status line and response headers, which often carry the real explanation. Inspect the Location header and count redirect hops: chains and loops are the usual culprits, and DevTools shows whether the browser rewrote your method on the way. For this code specifically, check whether the most common trigger applies to your situation: a legacy server or appliance emits 305 from old http/1.1-era code. Compare your exchange against the raw HTTP example above. If you operate the server, correlate the timestamp with application and proxy logs using the request id; if you are the client, verify the request shape against the API documentation before changing anything or retrying.

Notes & gotchas

Honoring 305 would let any server route your traffic through an arbitrary proxy, which is why it was deprecated: treat it as hostile or broken, never as a configuration instruction.

Examples

Raw HTTP
HTTP/1.1 305 Use Proxy
Location: http://proxy.example.com:8080/

curl
curl -i https://api.example.com/v1/resource   # observe the 305 response and its headers
JavaScript (fetch)
const res = await fetch("https://api.example.com/v1/resource");
// 305 Use Proxy: fetch follows redirects automatically.
// Use redirect: "manual" only when you must inspect Location yourself;
// browsers rewrite POST->GET on 301/302 but preserve it on 307/308.
Python (requests)
import requests

res = requests.get("https://api.example.com/v1/resource", timeout=10)
# 305 Use Proxy: requests follows redirects by default.
# allow_redirects=False to inspect Location; note requests preserves
# the method on 307/308 but rewrites POST->GET on 301/302 like browsers.

Frequently asked questions

Is 305 still valid HTTP?

It is reserved but deprecated; RFC 9110 marks it as such because honoring it lets servers redirect clients through arbitrary proxies.

What should I use instead of 305?

Configure proxies out of band: system proxy settings, PAC files, or HTTP_PROXY environment variables.

Which redirect code should I use?

Permanent move: 301 (GET) or 308 (method-preserving). Temporary: 302 (GET) or 307 (method-preserving). After a POST that should not repeat on refresh: 303. Cache revalidation is 304, not a redirect.

Do redirects hurt SEO or performance?

Single-hop permanent redirects (301/308) pass link equity and are fine. Chains, loops and temporary redirects for permanent moves waste crawl budget, add latency and dilute signals.

Advertisement
Ad slot · ref-in-article

Try the JSON Validator

Check JSON syntax and locate errors by line and column.

Open tool →