Glossary Proxy features
HTTP status codes for proxies
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
| Code | Name | Who sends it | Usual cause | What to do |
|---|---|---|---|---|
| 200 | OK | Target | Success, or a disguised block page | Validate the content |
| 301 / 302 | Redirect | Target | Location or login redirect | Check if it redirects by country |
| 400 | Bad Request | Target or proxy | Malformed request, bad proxy URL | Check request and proxy syntax |
| 403 | Forbidden | Target | IP, ASN or client blocked | Change IP type, fix client fingerprint |
| 404 | Not Found | Target | Wrong URL, or geo-specific content | Check URL from a direct connection |
| 407 | Proxy Authentication Required | Proxy | Bad or missing credentials, IP not allowlisted | Fix credentials, encode special characters |
| 429 | Too Many Requests | Target | Rate limit hit | Slow down, honour Retry-After, rotate |
| 451 | Unavailable For Legal Reasons | Target | Content blocked in that country | Use a permitted location or stop |
| 500 | Internal Server Error | Target | Target-side problem | Retry later |
| 502 | Bad Gateway | Proxy | Proxy got an invalid response from the exit or target | Retry through another exit |
| 503 | Service Unavailable | Target or proxy | Overload, maintenance or a challenge page | Back off, check for challenges |
| 504 | Gateway Timeout | Proxy | Exit or target too slow | Raise 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
- Treat 407 as a configuration error and stop; retrying will not help.
- Retry 502 and 504 on a new IP, a limited number of times.
- On 429, wait for
Retry-Afteror use exponential backoff. - On 403, do not hammer the same IP. Review headers, fingerprints and IP type.
- On 200, verify the page contains the data you expect before counting it as a success.
Quick reference for proxy work
| Code | Name | Usually means | First thing to try |
|---|---|---|---|
| 200 | OK | Success, but still check the body for a challenge page | Validate the content |
| 301 / 302 | Redirect | Location, login or consent redirect | Follow it, check where it goes |
| 400 | Bad Request | Malformed request or headers | Compare with a real browser request |
| 403 | Forbidden | Blocked IP, fingerprint or region | Try another IP type or fix the client |
| 404 | Not Found | Wrong URL, or a site hiding content from bots | Check in a normal browser |
| 407 | Proxy Authentication Required | Proxy credentials wrong or IP not allowlisted | Check username, password, encoding |
| 429 | Too Many Requests | Rate limit | Slow down, respect Retry-After |
| 502 | Bad Gateway | Proxy or exit could not get a valid response | Retry through another exit |
| 503 | Service Unavailable | Overload, maintenance or a challenge page | Back off, inspect the body |
| 504 | Gateway Timeout | Exit or target too slow | Increase 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.