You open Facebook Ads through a proxy, and instead of the dashboard, you see a white screen with code 502. Or the Wildberries parser suddenly starts throwing 503 errors every five minutes. The first thought is that the proxies have broken, and it’s time to change the pool. However, in half of the cases, the problem is not with the proxy but on the site’s side, and changing the IP won’t fix anything. Let’s figure out how to accurately determine the source of the problem in just a few minutes and avoid wasting time testing working proxies.
What do codes 502 and 503 mean
Before blaming the proxy, it’s important to understand that these codes are reported by the HTTP protocol itself, and they describe a problem on the server side you are trying to reach, not on the client side. 502 Bad Gateway means that an intermediate server (for example, a load balancer or a CDN like Cloudflare) received an invalid response from an upstream server. In simpler terms, a link in the chain between you and the end application is broken or overloaded.
503 Service Unavailable indicates that the server is temporarily unable to handle the request—most often due to overload, maintenance, or activation of bot protection. An important nuance: 503 indicates temporary unavailability; the server is alive, just not ready to respond right now.
Both codes clearly indicate "problem on the server." However, when using a proxy, the picture becomes more complicated: the proxy server itself can be the "intermediate link" generating 502 if it cannot reach the target site. Meanwhile, 503 often appears not because the site is actually down, but because the protection system (Cloudflare, Akamai, DataDome) has flagged the proxy IP as suspicious and instead of the actual page, it returns a placeholder with code 503 or 429.
Why these errors occur more frequently through proxies
If the site opens consistently without a proxy, but regularly throws 502 or 503 errors through a proxy, there are usually several reasons, all related to how the proxy integrates into the request chain.
Overload of the proxy server itself. Cheap datacenter proxies may have too many concurrent sessions hanging on one IP. When the proxy fails to proxy the traffic, it either drops the connection or returns a 502 on its own behalf.
IP blocking on the target site's side. Facebook Ads, Instagram, Wildberries, and Ozon actively use anti-bot systems that ban ranges of datacenter IPs in bulk. In this case, the site is formally operational, but for a specific IP, it returns 503 or redirects to a captcha.
Geographical mismatch. If the proxy is from one country, but the account was created with a tie to another region, some services temporarily "suspend" the session and return a gateway error instead of a straightforward access denial.
Protocol and port. An incorrectly specified proxy type (HTTP instead of SOCKS5, or vice versa) in the anti-detect browser settings often masquerades as 502—the browser physically cannot establish a tunnel and shows a gateway error.
Quick check: proxy or site
The most reliable way to figure this out is to eliminate variables one by one. Here’s a step-by-step process that will take no more than five minutes.
Step 1. Open the same site without a proxy, directly from your real IP. If the error repeats—then the problem is definitely on the site’s side, and the proxy is not involved.
Step 2. If everything works without a proxy, change the proxy to another IP from the same pool. If the error disappears—it means that a specific IP was banned or overloaded, not the entire service.
Step 3. Check the same proxy on another site (for example, open any neutral resource like httpbin.org or whatismyip). If the proxy doesn’t open anything at all—the problem is with the proxy server itself, not the target site.
Step 4. If the proxy opens other sites normally, but consistently throws 503 on the target resource—it is almost always bot protection that has flagged your IP as suspicious. In this situation, changing the type of proxy helps, rather than just rotating within the same pool.
Diagnostics in Dolphin Anty, AdsPower, and Multilogin
If you manage accounts through an anti-detect browser, it’s more convenient to perform diagnostics directly within it, without switching to third-party services.
In Dolphin Anty, open the profile, go to the proxy settings, and click the connection check button. If the test shows "Proxy not responding" or times out—the problem is at the proxy server level, and the 502 error in the browser will be a logical consequence. If the test passes successfully, but the site within the profile still returns 502 or 503, note the response code and open the same URL in a neighboring tab with a different profile on another IP—this will show whether it’s a systemic problem or local.
In AdsPower, a similar function is called "Proxy check," which additionally shows response speed and determined geolocation. If the geolocation of the proxy does not match the expected one (for example, you purchased a US proxy, but the service shows the Netherlands), this is a reason to suspect substitution or incorrect configuration, which can also provoke gateway errors.
In Multilogin and GoLogin, proxy checking is moved to a separate dialog when creating a profile—use it before each campaign launch, especially if you are farming new accounts in bulk. A five-second check is enough to avoid wasting an hour figuring out the reasons for 502.
Technical method: checking via curl
For those working with parsing or configuring proxies programmatically, the most accurate diagnostic method is a direct request via the terminal. This allows you to see the actual response code without the "embellishments" of a browser.
curl -x http://login:password@proxy_ip:port -I https://example.com -v
The flag -I requests only the headers, while -v enables verbose output, which shows at which exact stage the disconnection occurred—during the tunnel establishment to the proxy or when accessing the target server.
If the error occurs immediately when connecting to the proxy (lines like Connection refused or Connection timed out), the proxy server itself is to blame. If the tunnel is established, but the response comes back with code 502 or 503 from the target domain—the problem is on the site’s side or its protection.
It’s useful to run a dozen proxies from the pool through a script and collect response code statistics—this will quickly show whether there’s a systemic issue with the entire pool or if it’s just a couple of "stale" IPs:
for proxy in $(cat proxies.txt); do
code=$(curl -x "$proxy" -o /dev/null -s -w "%{http_code}" https://example.com)
echo "$proxy -> $code"
done
If more than 30% of the proxies from the pool return 502 on different sites—the problem lies with the provider or the infrastructure itself, and it’s worth changing the entire pool. If errors only occur on one specific domain—the issue is with the anti-bot protection of that site.
Table: causes of errors by proxy types
Different types of proxies are differently susceptible to errors 502 and 503—it’s important to consider this when choosing one for a specific task.
| Proxy Type | Typical Cause of 502/503 | Error Frequency |
|---|---|---|
| Datacenter Proxies | Mass bans of IP ranges by anti-bot systems, overload of shared servers | High |
| Residential Proxies | Sometimes unstable connection of the donor IP device | Low |
| Mobile Proxies | IP change by the operator during the session, temporary signal drops | Medium, but brief |
Datacenter IPs are most often known to anti-bot systems in advance, which is why they provoke the highest share of 503 errors on platforms like Facebook Ads, Instagram, and marketplaces. Residential and mobile IPs appear to protection systems as regular users, so the rate of false blocks is significantly lower, though not zero.
How to reduce the number of errors
For arbitrage specialists who farm Facebook Ads or TikTok Ads accounts, it is critical that the IP does not get blacklisted by anti-bot systems—this is what most often results in a 503 code. In such tasks, residential proxies behave noticeably more stably than datacenter ones because their IPs belong to real providers and raise suspicion less frequently with protection systems.
For SMM specialists managing Instagram and TikTok accounts through several anti-detect profiles simultaneously, a 502 error often results from overloading the same IP with too many sessions. The solution is to assign a unique IP to each account and not skimp on the number of addresses in the pool.
For sellers monitoring prices on Wildberries, Ozon, and Avito, a 503 error most often means that the site’s protection has recognized the pattern of frequent similar requests. Here, it helps not so much to change the type of proxy, but to reduce the frequency of requests and add random delays between requests, combined with IP rotation for each new request.
For parsing and automated scripts, where speed and connection stability are important with large volumes of requests, datacenter proxies remain a reasonable choice for price and speed—but they should be used wisely, evenly distributing the load among a larger number of IPs to avoid hitting the limits of a single address.
Diagnostics checklist
Save this sequence and follow it whenever you encounter 502 or 503 errors through a proxy:
- Open the site without a proxy—does the error repeat?
- Check the proxy connection separately (whatismyip, httpbin).
- Change the IP within the same pool and repeat the request.
- Check the proxy type and port in the profile settings (HTTP/SOCKS5).
- Run several IPs through curl and compare response codes.
- Check if the geolocation of the proxy has changed relative to the account binding.
- Reduce the frequency of requests if the error only occurs on one site.
- If errors are widespread across the pool—change the provider or type of proxy.
Conclusion
Codes 502 and 503 are not a death sentence and do not immediately warrant abandoning proxies. In most cases, five minutes of diagnostics is enough to understand where exactly the failure occurred: in the proxy server itself, on the target site, or in its bot protection system. Checking without a proxy, changing the IP within the pool, and testing via curl or built-in tools of anti-detect browsers like Dolphin Anty and AdsPower resolve 90% of such issues without unnecessary guesswork.
If the cause lies not in the settings but in the fact that your IPs are regularly getting blacklisted by anti-bot systems, it’s worth reconsidering the type of proxy for the task. For farming advertising accounts and working with social media, it’s reasonable to look into residential proxies—they are less likely to raise suspicion with website protection systems. For tasks where speed is critical with large volumes of requests, datacenter proxies will suffice, and for the most natural behavior in mobile applications—mobile proxies are suitable.