Skip to content
3xx redirectionDeprecated

305 Use Proxy

A deprecated redirect that told the client to repeat the request through the proxy named in the Location header.

What 305 Use Proxy means

305 asked the client to reach the resource through a specific proxy. It was deprecated because letting a server choose a client's proxy is a security risk.

Modern browsers do not follow it, and servers should not send it.

Example response

HTTP/1.1 305 Use Proxy
Content-Type: text/plain; charset=utf-8

305 Use Proxy

How to check for a 305 response

cURL

# Print only the status code (no -L, so the redirect isn't followed)
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

JavaScript (Node.js)

const res = await fetch("https://example.com/", { redirect: "manual" });
if (res.status === 305) {
  console.log(res.status, res.statusText, res.headers.get("location"));
}

Python

import requests

res = requests.get("https://example.com/", allow_redirects=False)
if res.status_code == 305:
    print(res.status_code, res.reason, res.headers.get("Location"))

Go

client := &http.Client{
	CheckRedirect: func(*http.Request, []*http.Request) error {
		return http.ErrUseLastResponse
	},
}
res, err := client.Get("https://example.com/")
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 305 {
	fmt.Println(res.Status, res.Header.Get("Location"))
}

Specification

305 Use Proxy is defined in RFC 9110, section 15.4.6.

  • 307

    Temporary Redirect

    The resource is temporarily at another URL, and the client must repeat the exact same request there, keeping the method and body.

  • 407

    Proxy Authentication Required

    A proxy between you and the website needs you to authenticate before it will forward your request.

← all 63 HTTP status codes

Type to search posts, tools and projects.

Keyboard shortcuts

Search+Kor/
Go to homegthenh
Go to bloggthenb
Go to projectsgthenp
Go to timelinegthent
Show this help?
Close search or helpesc