Proxy errors: who sent the code, and how to fix it
Every error you get through a proxy came from one of three places: the proxy, the site, or a service in front of the site such as Cloudflare. Each needs a different fix, and the fix for one never helps the others: a new IP cannot fix a wrong login, and a new login cannot fix a site that is down. This one command tells the proxy's answer from the site's:
curl -s -o /dev/null -x "http://USERNAME:[email protected]:8000" \
-w "proxy %{http_connect} site %{http_code}\n" https://the-site-you-need.com/page A code in the "proxy" place came from your proxy; with proxy 200, the code in the "site" place came from the site. It works for https:// addresses; why, and what each result means.
Every code, by who sends it
| Code | What it means through a proxy | Who sends it |
|---|---|---|
| 407 | The proxy refused your login | Your proxy |
| 403 | The site refused the request, or the proxy refused that site | The site or your proxy |
| 429 | Too many requests for the site's limit, or your plan's | The site or your proxy |
| 504 | The proxy, or the site's gateway, stopped waiting | The site or your proxy |
| 200 | The request worked, but the page is a block or a captcha | The site |
| 520 | The site's server sent Cloudflare a broken answer | Cloudflare, about the site's server |
| 521 | The site's server refused Cloudflare | Cloudflare, about the site's server |
| 522 | Cloudflare could not reach the site's server in time | Cloudflare, about the site's server |
| 524 | The site's server took longer than 125 seconds | Cloudflare, about the site's server |
A 407 always comes from the proxy, and the Cloudflare codes (520 to 524) always describe the site's own server. The other codes can come from either side: the command above tells you which.
Before you change anything
- Load the same page without the proxy. If it fails there too, the site is the problem and no proxy setting will fix it.
- Read the whole answer, not only the code. Some providers put the reason in the response body or a header. A 200 can also be a block page: check the content.
- Retry once, with a wait. Many errors through residential exits are one bad route. A second failure on a new IP is a pattern; a loop of instant retries spends traffic on a plan billed by the GB.
Set up and test a proxy
- How to set up a proxy in Firefox
- How to set up a proxy
- How to test a proxy before you rely on it
- How to use a proxy with curl
- How to use a proxy with wget
- How to use a proxy with Python Requests
- How to use a proxy with Puppeteer
- How to use a proxy with Selenium
- How to use a proxy in Chrome
- How to set up a proxy in Windows
- How to set up a proxy on a Mac
- How to set up a proxy on an iPhone
- How to set up a proxy on Android
Each command was run once on Oct 19, 2026, against a test proxy; logins are placeholders and addresses documentation addresses. We do not measure any provider's speed or success rate. Prices for your own amount: compare residential plans.