Proxy Error Codes: 407, 403, 429, 502, and 504 Explained
ColdProxy Team11 min read

When a proxy throws an error, the fastest fix is classification, not retries. Ask one question first: did the proxy reject me, did the target reject me, or did the route fail before a full response came back? A 407 points to proxy authentication. A 429 points to rate limiting. A 403 means the target refused you. A 502, 503, or 504 usually means a server on the path, DNS, or the target response itself fell over.
That one split saves hours. Most teams burn time cranking up retries on a 403 the target will never accept, or swapping providers over a 504 that was really a slow target. This guide walks through the proxy errors you actually see in production scrapers, QA monitors, rank trackers, and API clients, then gives you a small, repeatable workflow for testing a proxy before you touch code or change plans.
Key takeaways
- 407 is a proxy-auth problem. Fix credentials, IP whitelist, port, and auth format before anything else.
- 403 is almost always the target refusing you, not a broken proxy. Compare a direct request and a proxy request to confirm.
- 429 is a rate-limit signal. Respect
Retry-After, back off with jitter, and lower concurrency instead of buying a bigger pool. - 502, 503, 504 are route or upstream failures. Check whether the error follows one target, one proxy route, or only high-concurrency jobs.
- DNS and TLS errors happen before HTTP even completes. Test
httpandsocks5hseparately to see where hostname resolution lands. - Classify the code, test one request, log the route, then change one variable at a time.
What a proxy error code actually tells you
A proxy sits between your client and the target site, so an error can come from more than one layer. The proxy can reject the request before forwarding it. The target can reject it after receiving it. Or an upstream network path can fail while the proxy is mid-request. Same red error in your logs, three completely different owners.
HTTP standards already name these for you. RFC 9110 (IETF, 2022) defines 403, 407, 502, 503, and 504. RFC 6585 (IETF, 2012) defines 429 Too Many Requests and notes that the response may include a Retry-After header. Those definitions matter because each code points to a different layer and a different fix.
Here is the mental model that keeps triage fast:
- 407 means check proxy access first: credentials, IP whitelist, port, and auth format.
- 403 means check target access: permissions, geo fit, IP reputation, request headers, and whether the workflow is allowed at all.
- 429 means check traffic rate: concurrency, burstiness, per-IP request volume, and
Retry-Afterbehavior. - 502, 503, 504 mean check the route: target availability, DNS, timeout windows, proxy health, and whether the failure repeats across IPs.
- DNS or TLS error means resolution or the handshake failed before HTTP completed: hostname, protocol, certificate path, or your local network.
Work that order and you almost never chase the wrong layer.
407 Proxy Authentication Required
MDN (Mozilla, 2024) describes a 407 as the proxy refusing a request that lacks valid credentials. In practice, the target site may never have seen your request at all. So don't start by tweaking rotation rules. Start by proving the proxy login works.
The usual culprits:
- a wrong username or password
- a password with special characters that was never URL-encoded
- connecting from an IP that is not whitelisted
- using the wrong proxy port
- sending credentials to the target instead of the proxy
ColdProxy supports both User:Pass and IP Auth across its current plans, so a 407 usually traces back to one of those two paths. If you are deciding between them, the ColdProxy guide on IP whitelisting vs username/password authentication covers the tradeoffs.
A clean 407 flow looks like this:
- Confirm the host, port, protocol, username, and password all came from the same plan or dashboard section.
- If you use IP Auth, confirm the calling server's public IP matches a whitelisted IP exactly.
- If credentials are embedded in a URL, URL-encode any special characters in the username or password.
- Test one proxy outside your application before changing production code.
- Only after one proxy works should you test bulk rotation or concurrent sessions.
The everything curl proxy auth guide (Daniel Stenberg, 2024) shows the dedicated --proxy-user option. That separation matters: proxy credentials and target-site credentials are different things, and mixing them up is a common 407 root cause.
# Echo the exit IP the proxy gives you (ColdProxy's IPv4 check endpoint)curl -x http://HOST:PORT --proxy-user USER:PASS https://api.vipv6proxy.com/api/checker/my-ip
# SOCKS5 with remote DNS resolution through the proxycurl -x socks5h://HOST:PORT --proxy-user USER:PASS https://api.vipv6proxy.com/api/checker/my-ipIf that request returns a clean JSON body with the exit IP, the proxy login works and your 407 is in your application config, not the proxy. For IPv6 routes, swap in https://api6.vipv6proxy.com/api/checker/my-ip.
403 Forbidden
A 403 is a different animal from a 407. The proxy can be working perfectly; the target simply refused the request. RFC 9110 defines a 403 as the server understanding the request and declining to fulfill it.
In proxy workflows, a 403 can mean several things at once: the target doesn't allow the action, the session lacks permission, the route doesn't match the expected country or account state, the IP reputation is poor for that target, or the request pattern looks too far from normal allowed traffic.
The wrong reaction is blind retrying. If the target is refusing you, ten immediate retries just create ten noisier failures. Instead, run a three-way comparison: one direct request, one proxy request, and one request through a known-good proxy. Then look at what actually changed: status code, final URL, response body, headers, and the region the target saw.
When a target is location-sensitive, check the exit route you're actually presenting. ColdProxy's free IP address checker shows your visible IPv4 and IPv6 details, and the proxy checker confirms whether a proxy is responding before you drop it into a job. Both are diagnostics, not a trial, but they isolate "the proxy is fine, the target is refusing" in about thirty seconds.
One thing a 403 can never become: permission. Proxies route legitimate requests through selected locations and IP types. They do not make an unauthorized workflow acceptable, and no error code changes that. For public-data collection, review the site's terms and any applicable rules before you scale.
429 Too Many Requests
A 429 means slow down. MDN (Mozilla, 2024) describes it as a rate-limiting response, and RFC 6585 says it may carry a Retry-After header. In proxy operations, 429 is rarely fixed by changing the password or buying a bigger pool. It's fixed by controlling behavior.
Measure these before you change anything: requests per target per minute, concurrent sessions per IP, retry count, retry delay, and whether the target sends Retry-After. If you're collecting public data, also review the target's terms, its robots guidance where relevant, and any applicable data-protection rules before you scale up.
Treat 429 as feedback, not failure:
- Respect
Retry-Afterwhenever it appears. - When it doesn't, use exponential backoff with jitter and cap the retry count.
- Record 429 rate by target and by proxy route.
- If 429s cluster on one target, the target's policy is the limit.
- If they cluster on one route or session style, the routing strategy needs work.
function nextDelayMs(attempt, retryAfterSeconds) { if (Number.isFinite(retryAfterSeconds)) { return retryAfterSeconds * 1000 }
const base = Math.min(30000, 1000 * 2 ** attempt) const jitter = Math.floor(Math.random() * 750) return base + jitter}Session design feeds directly into rate-limit fixes. ColdProxy's Residential IPv4 plans support rotating or sticky sessions with a sticky duration configurable from 5 seconds up to 24 hours (default 60 seconds). Residential IPv6 and Datacenter IPv6 support sticky 5 seconds to FOREVER, or rotating. Account-like workflows usually want stability, so a long sticky window helps. Stateless public checks can lean on more rotation. Match the fit to the job, not to habit.
502, 503, and 504 proxy errors
The 5xx class usually means a server on the path failed to complete the request. In proxy workflows, that path includes your client, the proxy, DNS, upstream routing, and the target site itself.
- A 502 often means a gateway received an invalid upstream response.
- A 503 points to a service being unavailable or overloaded.
- A 504 means a gateway or proxy didn't receive a timely upstream response. MDN (Mozilla, 2024) has a clear reference.
The fix depends entirely on repeatability:
- If one target returns 504 across many proxies, the target or network path is slow.
- If one proxy route returns 504 across many targets, check that route or provider status.
- If only high-concurrency jobs fail, lower parallelism before changing products.
- If DNS errors appear with SOCKS5, test
socks5hso hostname resolution happens through the proxy. - If TLS errors appear, confirm the protocol and target hostname are correct before blaming the IP.
For context on what "healthy" looks like: ColdProxy targets a 99.9% success rate with up to 0.6s response time, so a route that consistently times out on a single target is more likely a target-side or concurrency problem than a dead proxy. Confirm the route is alive with the proxy checker before you assume the worst.
A practical proxy troubleshooting workflow
Run this order before you open a support ticket or rewrite your scraper. It keeps the test small and makes the evidence useful if you do need help.
- Reproduce the error with one proxy, one target URL, and one request method.
- Record the exact status code, a response-body snippet, the timestamp, proxy type, protocol, and target URL.
- Check whether the error appears before or after proxy authentication.
- Run the same target through a direct connection when that's safe and allowed.
- Run a visible exit-IP check so you know which IPv4 or IPv6 route the target sees.
- Drop concurrency to one request and remove automatic retries.
- Add retries, rotation, and concurrency back one layer at a time.
- If it still fails, send support the minimal reproduction and logs, not a vague "proxy not working."
If you're still setting up, the ColdProxy guide on how to set up a proxy on any device covers the host, port, protocol, and credential fields. For scraping workflows, pair this with using proxies for web scraping so your retry and rotation behavior stays aligned with compliant public-data collection.
How to choose the right fix
Don't treat every proxy error as an IP-quality issue. The cheapest, fastest fix is usually configuration. Use this decision path:
- 407 → fix authentication before touching target logic.
- 429 → reduce request pressure before adding more retries.
- 403 → inspect authorization, target rules, the exit route, and whether the workflow itself should change.
- 502 / 503 / 504 → compare failures across targets and proxy routes before deciding who owns the incident.
- DNS or TLS → test HTTP and SOCKS5 separately and confirm where hostname resolution happens.
When the fix really is the route, match the proxy to the job. The ColdProxy lineup is four plans: Premium Residential Geo Target IPv4 (Unmetered), Premium Residential Geo Target IPv4 (GB Based), Residential IPv6, and Datacenter IPv6. Residential IPv4 spans 195+ countries from a 70M+ global pool, which suits geo-sensitive 403s. It adds state or region targeting in the United States, United Kingdom, Germany, Brazil, India, and Canada, and city targeting where local ISP supply exists. Datacenter IPv6 is Mbps speed-tiered across a real metro list (New York, Chicago, London, Frankfurt, Amsterdam, Tokyo, Singapore, Sydney, and more) for high-throughput jobs that hit 504s under concurrency. Check the pricing page for current plan details before buying, since packaging can change.
Limitations and edge cases
Some errors don't map cleanly to one owner. A target may return a custom 403 page that's really rate limiting in disguise. A provider may map an upstream timeout into a branded error body. A web application firewall may return a 200 with a challenge page instead of a 403. That's exactly why you log the status code, response body, target URL, proxy route, protocol, and retry history together, so a misleading body never sends you down the wrong path.
And again: proxies are not a permission system. They route legitimate requests through selected locations and IP types. They don't make an unauthorized workflow acceptable. For public-data collection, review site terms, applicable laws, and your own compliance requirements before scaling.
Frequently Asked Questions
What does a 407 error mean when using a proxy?
A 407 means the proxy requires authentication and didn't accept the credentials or authorized IP for the request. Check the username, password, IP whitelist, port, and protocol before touching rotation or retry logic. The target site may never have received your request at all.
Is a 403 a proxy problem or a target-site problem?
A 403 almost always comes from the target side: the server understood the request and refused it. The proxy can still be working fine. Run a direct request, a single proxy request, and a visible exit-IP check to isolate the cause before you change routes.
How should I handle 429 errors with proxies?
Treat a 429 as a rate-limit signal. Respect Retry-After when it's present, lower concurrency, add exponential backoff with jitter, and track 429 rates by both target and route. Do not retry in a tight loop, which usually makes the limit worse.
Why do I get a 504 Gateway Timeout through a proxy?
A 504 means a gateway or proxy waited too long for an upstream response. Test whether the timeout follows one target, one proxy route, or only high-concurrency jobs. That tells you whether to wait, reduce load, or change the route, rather than guessing.
Can a proxy checker find every production issue?
No. A proxy checker confirms that a proxy responds and shows the visible exit route, which rules out a dead proxy quickly. It can't prove every target will accept your workflow. Use it as the first test, then validate the actual target and request pattern.
Build the error log before you scale
The teams that fix proxy failures fastest don't guess. They classify the code, test one request, record the route, and change one variable at a time. Once that habit is in place, proxy errors stop being confusing outages and become measurable signals.
Start small: test one proxy in the ColdProxy proxy checker, confirm the visible IP with the my IP tool, then move the same settings into your application. When the single request works, scale gradually and let your logs tell you what to fix next.


