The short answer
502 Bad Gateway comes from a proxy or gateway, not from you. It means the proxy forwarded your request and got back something it could not use: a dropped connection, garbage, or nothing at all.
What to try
- Retry. With rotating residential proxies, the home device behind the IP may simply have gone offline.
- Test the site directly without the proxy, to rule out the website being down.
- Switch IP or country.
- Check the provider's status page if every request fails.

Also known as
HTTP 502, bad gateway error, upstream error.
Learn more
- Common proxy errors
- What is a proxy timeout?
- How to check if a proxy works
- Proxy speed test
- RFC 9110, HTTP semantics (status 502)
- MDN on proxy servers and tunneling
- The curl manual, for testing step by step
- Wireshark, to see what actually happened
Affiliate disclosure: Team of Monkeys is an affiliate of Geonode, Webshare and Rayobyte. Links and banners marked as sponsored, and links to Geonode, Webshare and Rayobyte in the text, use our referral links, and we may earn a commission if you buy through them, at no extra cost to you. Our explanations and comparisons are written to be useful whichever provider you choose.
Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.
Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.