How to Fix Proxy Errors: 407, 403, 429, Timeouts and SSL
Most proxy errors come from one of five causes: wrong or missing credentials (407), the target site refusing the request (403), sending requests too fast (429), a slow or unreachable route (timeouts, 502/504), or TLS set up wrong (SSL errors). Read the status code first. It tells you whether the problem is your setup, the proxy or the website, and that decides the fix. This guide covers each error with the cause, a quick test and the fix, plus copy-paste curl and Python checks.
If you're paying for proxies and spending hours on errors, the proxy is often part of the problem. Shared, recycled IPs with a bad history get 403s and CAPTCHAs on the first request. CleanProxies ISP proxies are 100% dedicated, 0-fraud-score IPs on Tier-1 US carrier ASNs, from $0.75/IP, so you can spend that time on your project.
TL;DR
407 Proxy Authentication Required: the proxy rejected your login. Check the username, password, port and auth mode (user:pass or IP whitelist). This one is always on your side and always fixable.
403 Forbidden: the website refused you. Usually it's IP reputation, a mismatched browser fingerprint or blocked access. Use clean dedicated IPs and send realistic headers.
429 Too Many Requests: you're too fast for that site. Slow down, honour
Retry-After, spread load across more IPs and use backoff.Timeouts / 502 / 504: the route is slow or the upstream didn't answer. Test the proxy on its own, raise timeouts sensibly and pick low-latency IPs close to the target.
SSL errors: wrong proxy scheme (
https://vshttp://), an intercepting tool, or outdated CA certificates.The quickest win: start with clean IPs. CleanProxies ISP proxies run on 100Gbps ports with <20ms latency and 99.9% uptime, which removes most 403s and timeouts before you start debugging. Test 5 IPs for an hour with the $4.99 trial.
Proxy errors at a glance
| Error | Who is rejecting you | Most common cause | First thing to try |
|---|---|---|---|
| 407 Proxy Authentication Required | The proxy server | Wrong user/pass, wrong port, IP not whitelisted | Re-copy credentials; test with curl -x |
| 403 Forbidden | The target website | Flagged IP, bot-like headers, no access to the page | Switch to a clean dedicated ISP IP; fix headers |
| 429 Too Many Requests | The target website | Request rate above the site's limit | Honour Retry-After, add backoff, lower concurrency |
| 502 Bad Gateway | Proxy â upstream link | Upstream sent an invalid response or dropped the connection | Retry once; test another IP; check target status |
| 504 Gateway Timeout | Proxy â upstream link | Target too slow to answer | Raise read timeout; use a lower-latency route |
| Connect timeout | Network path to the proxy | Wrong host/port, firewall, blocked outbound port | curl -v to see where it hangs |
| SSL / TLS error | Your client | https:// proxy scheme, broken CA bundle, intercepting tool | Use http:// for the proxy URL; update certificates |
| CONNECT tunnel failed | The proxy server | Auth failed during the HTTPS tunnel, or port blocked | Treat as 407; check credentials and port |
Key stats: why sites refuse proxy traffic
51% of all web traffic in 2024 was automated, the first time in a decade bots passed humans, according to the Imperva 2025 Bad Bot Report.
37% of all internet traffic came from bad bots, up from 32% the year before (Imperva). That's why websites score every IP and limit request rates hard.
429 has its own status code and a
Retry-Afterheader that tells you exactly how long to wait (RFC 6585, section 4).407 means the proxy itself wants credentials, sent in the
Proxy-Authorizationheader, which is different from a website login (RFC 9110, section 15.5.8).
Because most traffic is automated, websites now decide fast: an IP with a bad history gets a 403 or a CAPTCHA right away, and a clean one gets the page. IP quality decides most outcomes before your code even matters. More on that in why clean IP quality matters.
Step zero: isolate the problem in 60 seconds
Before changing anything, find out which part is failing. Run one request through the proxy to a neutral endpoint:
curl -v -x http://USERNAME:PASSWORD@HOST:PORT https://api.ipify.orgYou get an IP back that matches your proxy: the proxy works. The problem is the target site (403/429) or your code.
407orCONNECT tunnel failed, response 407: credentials or auth mode. Go to the 407 section.Hangs at
Trying HOST:PORT...: network path or wrong host/port. Go to timeouts.SSL/certificateerrors: go to the SSL section.
Then run the same request against your real target. If ipify works and the target returns 403 or 429, the proxy is fine and the site is pushing back. You can also paste your proxy list into the free CleanProxies proxy checker to test many at once, and confirm the exit IP with What is my IP.
How to fix 407 Proxy Authentication Required
A 407 comes from the proxy server, not the website. The proxy needs to know who you are and didn't accept what you sent. It's the easiest error to fix because everything is under your control.
Causes, most common first:
Typo or stale credentials. A copied trailing space, a regenerated password, or credentials from a different order.
Wrong auth mode. You whitelisted your IP but your request still sends user:pass (usually fine), or you use user:pass while the proxy is set to IP-only and your current IP isn't whitelisted.
Your public IP changed. Home and office IPs change. If you use IP whitelisting, a new ISP lease breaks every request.
Special characters not URL-encoded. A password with
@,:,#or/inside a proxy URL breaks parsing. Encode it (@becomes%40) or pass credentials separately.The tool drops credentials on HTTPS. Some clients send credentials to plain HTTP but not inside the CONNECT tunnel. You see
CONNECT tunnel failed, response 407.Wrong port or protocol. Sending HTTP to a SOCKS5 port (or the reverse) can look like an auth failure.
Fix checklist:
Re-copy host, port, username and password from your dashboard. Check the auth type set on that proxy list.
If you use IP auth, check your current public IP on What is my IP and update the whitelist.
URL-encode special characters, or use your client's separate auth option:
import requests
from urllib.parse import quote
user = "USERNAME"
password = quote("p@ss:word", safe="") # encode special characters
proxy = f"http://{user}:{password}@HOST:PORT"
r = requests.get("https://api.ipify.org", proxies={"http": proxy, "https": proxy}, timeout=(10, 30))
print(r.status_code, r.text)Match the scheme to the port:
http://for HTTP proxies,socks5h://for SOCKS5 (needspip install requests[socks]). Not sure which you need? See SOCKS5 vs HTTP proxies.In an antidetect browser, put credentials in the proxy fields, not inside the host box. Our setup guides for AdsPower, Multilogin and GoLogin show each field.
On CleanProxies you can switch an ISP proxy list between IP:Port (whitelist), User:Pass and SOCKS5 from the proxy manager, and the new format is ready right away. If you're still stuck, 24/7 support will check the order with you.
How to fix 403 Forbidden through a proxy
A 403 means you reached the website and it chose to refuse you. The proxy did its job. Status codes are defined in RFC 9110, section 15.5.4: the server understood the request but won't fulfil it.
Why sites send 403 to proxy users:
IP reputation. The IP is in a datacenter range, on a blocklist, or was abused by its previous user. Shared and recycled pools are the usual cause.
Mismatched fingerprint. A US IP with a German timezone, a headless browser user agent, or a default
python-requests/2.xuser agent stands out right away.Geo rules. Some content is only served to certain countries or states.
Account or permission rules. Sometimes the page really is private and needs a logged-in session you're allowed to use.
Fix checklist:
Check the IP's reputation. Run it through our DNSBL blacklist checker and IP lookup to see the ASN and whether it's listed. A datacenter ASN on a consumer site is a common 403 trigger.
Use a real ISP IP. ISP proxies are registered to consumer carriers, so sites see them as normal home connections. CleanProxies ISP IPs come from Tier-1 US carrier ASNs with a 0 fraud score, and they're 100% dedicated, so no one else's traffic damages them. Background: what is a static residential proxy.
Send realistic headers. Set a current browser
User-Agent,Accept-LanguageandAccept. Check what you're sending with the user agent checker.Keep the profile consistent. Match timezone, language and WebRTC to the IP's location. The WebRTC leak test shows if your real IP leaks around the proxy.
Keep one IP per account. Rotating IPs inside one logged-in session looks like account sharing. Use a static ISP IP or a sticky session (rotating vs sticky sessions).
Respect the site's rules. If a page needs a login you don't have or the site's terms forbid automated access, a different IP isn't the answer. Use an official API or get permission.
How to fix 429 Too Many Requests
A 429 is the site's rate limiter saying you're too fast. It's defined in RFC 6585, and servers often include a Retry-After header with the number of seconds to wait. The fix is to behave like a polite client, not to push harder.
Fix checklist:
Read and honour
Retry-After. If it's there, wait that long before the next request from that IP.Use exponential backoff with jitter for retries instead of instant re-sends:
import random, time, requests
def get_with_backoff(url, proxies, max_tries=5):
for attempt in range(max_tries):
r = requests.get(url, proxies=proxies, timeout=(10, 30))
if r.status_code != 429:
return r
wait = int(r.headers.get("Retry-After", 0)) or min(60, 2 ** attempt)
time.sleep(wait + random.uniform(0, 1))
return rLower concurrency per IP. A few requests per second per IP is a sane starting point for most sites. Measure, then raise slowly.
Spread the load. With more IPs, each one sends fewer requests. CleanProxies includes unlimited bandwidth and threads on ISP proxies, and ISP pricing starts at $0.75/IP, so adding IPs is cheap. For large, varied crawls, rotating residential proxies from $0.63/GB rotate across 50M+ IPs.
Cache and dedupe. Don't fetch the same page twice in a run, and skip pages that haven't changed.
Check
robots.txtand the site's terms. Stay within published crawl rates.
For a full rate-limiting setup for price tracking, see proxies for Amazon sellers and price monitoring.
How to fix proxy timeouts, 502 and 504 errors
Timeouts come in two kinds, and they need different fixes:
| Symptom | Meaning | Fix |
|---|---|---|
Connection timed out / hangs at Trying... | You can't reach the proxy at all | Check host and port, local firewall, VPN, corporate network blocking outbound ports |
Read timed out | Connected, but no response in time | Raise the read timeout; the target or route is slow |
| 502 Bad Gateway | The proxy got a bad answer from upstream (RFC 9110 §15.6.3) | Retry once; try another IP; check if the target is down |
| 504 Gateway Timeout | Upstream didn't answer in time (RFC 9110 §15.6.5) | Longer timeout, fewer parallel requests, closer route |
Fix checklist:
Set separate connect and read timeouts. In Python
timeout=(10, 30)means 10 s to connect and 30 s to read. A single short timeout causes false failures on heavy pages.Measure where time goes.
curl -wbreaks a request into steps:
curl -s -o /dev/null -x http://USERNAME:PASSWORD@HOST:PORT \
-w "connect: %{time_connect}s tls: %{time_appconnect}s first byte: %{time_starttransfer}s total: %{time_total}s\n" \
https://www.example.com A slow connect points at the proxy route. A slow first byte with fast connect points at the target site.
Check the network behind the proxy. Oversold proxy servers on shared 1Gbps links slow down at peak hours. CleanProxies runs on 100Gbps network ports with <20ms latency and 99.9% uptime, so slow responses on our IPs nearly always come from the target, not the route.
Pick IPs close to the target. US targets with US IPs. CleanProxies' ISP IPs are all in the United States.
Don't hide errors behind endless retries. Log the error type per IP so you can drop a bad one instead of retrying it forever.
For a structured way to benchmark speed before you commit, use our proxy quality testing guide.
How to fix SSL and certificate errors with proxies
SSL errors through a proxy are almost always configuration, not the proxy.
https://in the proxy URL. Most HTTP proxies take a plainhttp://connection and then tunnel HTTPS with CONNECT. Writinghttps://HOST:PORTmakes your client attempt TLS to the proxy itself, which fails withwrong version numberor similar. Usehttp://HOST:PORTfor the proxy, even forhttps://targets.Outdated CA certificates. Old Docker images and servers ship stale CA bundles. Update
ca-certificates(Debian/Ubuntu) orpip install -U certifi.An intercepting tool in the middle. Debugging proxies, antivirus "web shields" and corporate firewalls swap certificates. Either trust their CA properly or turn them off while testing.
Clock skew. A server clock that's days off makes valid certificates look expired. Sync with NTP.
Don't switch verification off in production.
verify=Falsehides the real problem and exposes your traffic. Fix the cause instead.
Other errors you'll see
ERR_TUNNEL_CONNECTION_FAILED(Chrome): the browser couldn't open the CONNECT tunnel. Usually credentials or port, so treat it as a 407.ERR_PROXY_CONNECTION_FAILED: Chrome can't reach the proxy host at all. Check host, port and that your network allows outbound connections.SOCKS5 authentication failed/general SOCKS server failure: wrong credentials, or HTTP sent to a SOCKS port. In Python usesocks5h://so DNS resolves through the proxy.CAPTCHA on every page: not an error code, but the same cause as a 403. The IP's reputation is low. Clean, dedicated ISP IPs are the lasting fix.
Different IP than expected: your tool isn't using the proxy for every request (WebRTC, DNS or a system proxy setting). Check with the WebRTC leak test.
What the numbers mean for your setup
With more than half of web traffic automated and over a third of it malicious, sites don't give unknown IPs the benefit of the doubt. In practice:
407 and SSL errors are setup problems. Fix them once and they stay fixed.
Timeouts are usually infrastructure. The proxy provider's network capacity and route length matter more than your code.
403s and 429s are reputation and behaviour problems. Good pacing handles 429. Clean IPs handle most 403s. Neither can be fully fixed by code alone if the IPs are already burned.
So two of the five error families depend on which proxy you buy.
Which proxies cause the fewest errors
| Proxy type | Typical 403/CAPTCHA rate | Speed / timeouts | Best for |
|---|---|---|---|
| CleanProxies ISP proxies | Lowest: dedicated, 0-fraud-score carrier IPs | 100Gbps ports, <20ms latency | Accounts, e-commerce, SEO tools, long sessions |
| CleanProxies rotating residential | Low: 50M+ IPs, fresh IP per request or sticky | Good; varies by peer | Large crawls, geo-targeted data collection |
| CleanProxies mobile (4G/5G) | Very low on mobile-first sites | Slower than ISP by nature | Mobile apps, social platforms |
| Shared datacenter proxies | High: known hosting ASNs, shared by many users | Fast, but often oversold | Low-stakes targets only |
| Free / public proxies | Highest: abused and logged | Unreliable | Avoid |
For most users who keep hitting 403s, timeouts and CAPTCHAs, the answer is to move to CleanProxies ISP proxies: static US IPs registered to Tier-1 carriers, never shared, with unlimited bandwidth and threads and instant delivery. Need many IPs from one range? ISP subnet proxies start at $1.19/IP. Comparing providers? Our compare hub and the best ISP proxy providers ranking cover the market.
Testing checklist before you scale
Run the
curl -vipify test on 3â5 proxies. All should return the proxy IP.Check each IP's ASN with IP lookup and listings with the blacklist checker.
Send 20 requests to your real target at your planned pace. Count 200s, 403s, 429s and timeouts.
Log
time_connectandtime_starttransferto separate route speed from site speed.Run the WebRTC leak test in your browser profile.
Scale only when the error rate stays flat as you add load.
Try it on CleanProxies first: the $4.99 trial gives you 5 ISP IPs for 1 hour, or 100 MB of residential traffic. Start the trial.
CleanProxies pricing
ISP proxies: from $0.75/IP, the cheapest pricing on the market for dedicated US ISP IPs. See ISP proxies
ISP subnet (/24) proxies: from $1.19/IP. See ISP subnets
Rotating residential: from $0.63/GB, data never expires. See residential
Mobile 4G/5G: from $0.79/GB. See mobile proxies
Every plan includes instant delivery, 99.9% uptime and 24/7 support.
Stop debugging bad IPs. View pricing · Get ISP proxies · Check your current proxies free
Frequently Asked Questions
The proxy server rejected your login. Your username, password, port or auth mode is wrong, or your IP isn't whitelisted. Re-copy the credentials from your dashboard, URL-encode special characters and check your current public IP if you use IP whitelisting.
The website is refusing the IP or the request, usually because the IP has a poor reputation (datacenter range, blocklisted or shared) or your headers and browser fingerprint don't match a real user. Clean, dedicated ISP IPs such as CleanProxies' 0-fraud-score carrier IPs fix most of these.
Slow down. Honour the Retry-After header, retry with exponential backoff and jitter, lower concurrency per IP and spread requests across more IPs. CleanProxies ISP proxies start at $0.75/IP with unlimited bandwidth and threads, so adding IPs is cheap.
A connect timeout means you can't reach the proxy (wrong host/port or a blocked outbound port). A read timeout or 504 means the target or route is slow. Use separate connect and read timeouts, measure with curl -w, and use a low-latency network like CleanProxies' 100Gbps ports with under 20ms latency.
Use http:// for HTTP proxies, even when visiting https:// sites. The client opens a CONNECT tunnel and TLS runs inside it. Writing https:// for the proxy causes SSL 'wrong version number' errors. Use socks5h:// for SOCKS5.
Run a curl test to an IP echo service, check the ASN and blocklists, and send a small batch to your real target. CleanProxies offers a $4.99 trial with 5 ISP IPs for 1 hour, or 100 MB, so you can run these tests on real IPs.
- proxy errors
- troubleshooting
- 407
- 429
- isp proxies