ResidentialIPs.org

Glossary Proxy features

HTTP status codes for proxies

By the ResidentialIPs Editorial TeamUpdated

Proxy status codes: HTTP status codes are three-digit numbers that a website or proxy returns to describe the result of a request. A handful of codes appear again and again when you use proxies, and each points to a different cause.

Also called: proxy error codes, proxy errors, 407 error, 502 proxy error

Key takeaways

  • 407 means the proxy rejected your credentials; it is a proxy problem, not a website problem.
  • 403 and 429 usually come from the target site: blocked or rate limited.
  • 502, 503 and 504 point to failures between the proxy, the exit and the target.
  • A 200 response can still be a block page, so check the content.
  • Log status codes per proxy and per target to see patterns.

Codes you will see with proxies

CodeNameWho sends itUsual causeWhat to do
200OKTargetSuccess, or a disguised block pageValidate the content
301 / 302RedirectTargetLocation or login redirectCheck if it redirects by country
400Bad RequestTarget or proxyMalformed request, bad proxy URLCheck request and proxy syntax
403ForbiddenTargetIP, ASN or client blockedChange IP type, fix client fingerprint
404Not FoundTargetWrong URL, or geo-specific contentCheck URL from a direct connection
407Proxy Authentication RequiredProxyBad or missing credentials, IP not allowlistedFix credentials, encode special characters
429Too Many RequestsTargetRate limit hitSlow down, honour Retry-After, rotate
451Unavailable For Legal ReasonsTargetContent blocked in that countryUse a permitted location or stop
500Internal Server ErrorTargetTarget-side problemRetry later
502Bad GatewayProxyProxy got an invalid response from the exit or targetRetry through another exit
503Service UnavailableTarget or proxyOverload, maintenance or a challenge pageBack off, check for challenges
504Gateway TimeoutProxyExit or target too slowRaise timeouts or use faster exits

Telling proxy errors from target errors

A quick way to find the source: repeat the request directly (without a proxy) and through a different proxy type. If only one proxy fails, the issue is that proxy or its exit. If all proxies fail but the direct request works, the target is blocking proxies in general. If everything fails, the target or your request is the problem.

Some providers add their own headers (for example an error reason) on 502 or 407 responses. Check their documentation.

Handling errors in code

  1. Treat 407 as a configuration error and stop; retrying will not help.
  2. Retry 502 and 504 on a new IP, a limited number of times.
  3. On 429, wait for Retry-After or use exponential backoff.
  4. On 403, do not hammer the same IP. Review headers, fingerprints and IP type.
  5. On 200, verify the page contains the data you expect before counting it as a success.

Quick reference for proxy work

CodeNameUsually meansFirst thing to try
200OKSuccess, but still check the body for a challenge pageValidate the content
301 / 302RedirectLocation, login or consent redirectFollow it, check where it goes
400Bad RequestMalformed request or headersCompare with a real browser request
403ForbiddenBlocked IP, fingerprint or regionTry another IP type or fix the client
404Not FoundWrong URL, or a site hiding content from botsCheck in a normal browser
407Proxy Authentication RequiredProxy credentials wrong or IP not allowlistedCheck username, password, encoding
429Too Many RequestsRate limitSlow down, respect Retry-After
502Bad GatewayProxy or exit could not get a valid responseRetry through another exit
503Service UnavailableOverload, maintenance or a challenge pageBack off, inspect the body
504Gateway TimeoutExit or target too slowIncrease timeout or change exit

A 200 that is really a block

Many anti-bot systems answer with status 200 and a challenge or “access denied” page, so a scraper that only checks status codes counts failures as successes. Check for a known element on the real page, such as a product title or price, and treat its absence as a failure. That gives you a true success rate.

Logging errors usefully

Record the status code, the exit IP, the target URL, the response size and the first part of the body for every failure. Patterns appear quickly: one target blocking a whole subnet, one location timing out, or a proxy returning 407 after a password change.

Frequently asked questions

What does a 407 proxy error mean?

The proxy needs valid authentication. Your username or password is wrong, contains characters that need URL encoding, or your IP is not on the provider’s allowlist.

What causes a 502 Bad Gateway through a proxy?

The proxy could not get a valid response from the exit node or the target site, often because the exit went offline or the target dropped the connection.

Why do I get 403 errors only through proxies?

The site is blocking the proxy’s IP type, its ASN or a fingerprint mismatch in your client. Try ISP or residential IPs and a realistic browser client.

What is a 429 error?

Too Many Requests. You sent more requests than the site allows in a given time from that IP or session. Slow down and rotate.

Why do I get 502 errors on some sites but not others?

The exit node or proxy could not get a valid answer from that specific site. It may be blocking the exit IP at the network level, timing out or refusing the connection. Retrying through a different exit usually helps.

Sources and further reading

Browse all 40 glossary terms Markdown version