BuyProxy logo
Log inSign up
Error codes

HTTP and proxy error codes, explained

Each guide starts with a short answer, then covers what causes the error, how to tell whether your proxy or the site sent it, step-by-step fixes, and curl and Python examples.

Rate limits

Too many requests in too short a time. Some servers signal the same thing with a 503, and Cloudflare sites show error 1015.

Did the proxy or the site send the error?

Most errors you see through a proxy come from the site, not the proxy. The quickest test is where the error arrived. For an https:// URL, your client first asks the proxy to open a tunnel with a CONNECT request. An error in reply to CONNECT comes from the proxy, and nothing reached the site. Once the tunnel is open, the proxy only relays encrypted bytes, so any status inside it (a 403, 429 or 503, say) comes from the site or something in front of it, such as its CDN.

Two more checks settle most cases: the response headers (a Server or CF-Ray header names who answered) and the same request sent without the proxy. If the site answers the same way directly, the proxy isn't the cause.

CodeNameUsually sent by
407407 Proxy Authentication RequiredThe proxy, always
403403 ForbiddenThe site, or a firewall or CDN in front of it
405405 Method Not AllowedThe site or API
406406 Not AcceptableThe site or API
429429 Too Many RequestsThe site or API you called
502502 Bad GatewayA gateway: the site's CDN or reverse proxy, or your proxy
503503 Service UnavailableThe site, its load balancer or CDN; sometimes a proxy
504504 Gateway TimeoutA gateway: the site's CDN or reverse proxy, or your proxy
1015Cloudflare error 1015Cloudflare, on the site owner's rules
520Cloudflare error 520Cloudflare, about the site's origin server

Error codes: frequently asked questions

Which HTTP errors come from the proxy?

407 Proxy Authentication Required always does, and so does any error sent in reply to the CONNECT request before an HTTPS tunnel opens. 502 and 504 can come from a proxy or from the site's own gateway. A 403, 405, 406 or 429 inside an HTTPS tunnel comes from the site.

Which errors should I retry?

Retry 429, 502, 503 and 504 with backoff, honouring Retry-After when the server sends it. Don't retry a 407 until the credentials are fixed, and don't keep retrying a 403, 405 or 406: the same request gets the same answer.

What are Cloudflare error codes like 1015 and 520?

They are Cloudflare's own error numbers, shown on pages Cloudflare serves for the sites behind it. 1015 is a rate limit the site owner set; 520 means the site's own server sent Cloudflare an empty or invalid response.

Can I test BuyProxy before buying?

There is no free trial period, but you can ask support by chat, Discord or email for 100 MB of free Premium Residential bandwidth to test against your own targets.

Further reading