Is My Proxy IP Blocked? Ban Signals and How to Check

Published:

13 minute read

Acar Diveroli
Written by: Acar Diveroli
200, 403 and 429 cards move along a belt through a checking machine; 403, 429 and a blue 200 · CHALLENGE card sit apart

A block signal is a response showing that the target site no longer serves normal content to requests from an IP. The clearest signal is a 403 or 429 status code. Quieter ones are a challenge page, a short body or a redirect to the login page, all delivered with a 200 code. The trap: a broken header or a network error produces the same symptoms. This post covers the signals, how to tell where a block comes from, and what to do when you see one.

Signals in the status code

The status code is the clearest signal, but each code says something different. 403 means access is refused, 429 means a rate limit was exceeded, and 503 means the server cannot serve the request for now. None of them alone says "your IP is banned".

CodeSent byWhat it saysFirst step
403 ForbiddenTarget siteRequest understood, access refusedStop and read the body
429 Too Many RequestsTarget siteThe limit set for this client was exceededWait for Retry-After
503 Service UnavailableTarget siteThe server temporarily cannot respondWait; slow down if it persists
407 Proxy Authentication RequiredProxyProxy credentials missing or wrongCheck username and password
502 / 504ProxyThe proxy got no valid or timely response from the targetTry the target without the proxy

403 is the most ambiguous code. Under RFC 9110, the server may explain in the body why it refused access. The same RFC says a server that wants to hide a resource's existence may return 404 instead of 403. So a page that opened yesterday and returns 404 today can also be a signal. Always save the body: "access denied" and "members only" arrive with the same code.

429 is the clearest signal. RFC 6585 does not define how the server counts requests. It may count by IP, account, cookie or for the whole server. The Retry-After header tells you how long to wait, but it is optional. We showed the wait-and-retry code in our post on handling 429 errors with exponential backoff.

407 does not come from the site. The proxy is asking you for credentials, and the target site never saw the request. With an HTTPS target, most libraries surface this code as a tunnel error rather than a status code. In our test, Requests raised a ProxyError exception in this case.

A block inside a 200

Some sites send the block with a 200 code. The status code says success, but the body is a challenge screen or an empty template, not a product page. A scraper that checks only the status code treats these pages as data and writes empty records to the database. That line is the trap.

A silent block comes in three forms:

  • Challenge page. The body holds a phrase like verify you are human or a CAPTCHA form. The title and body length are the same on every URL.
  • Shorter body than expected. A page that is normally large arrives as a few KB with no product block. Pages filled by JavaScript also look empty in the first HTML. To avoid mistaking that for a block, compare with an earlier successful fetch of the same page.
  • Redirect to the login page. The request goes to /login with a 302, the client follows the redirect and the final response is 200. Requests keeps the intermediate responses in the history list and the final address in the url field.

The most reliable check is a positive marker. Pick an element that always appears on each page type, for example itemprop="price" for the price. If the marker is missing, the response is not data, whatever its code. Keep a baseline for body size too: the size from the first successful fetches of the same page type.

Connection-level signals

Some blocks produce no HTTP response at all. The server, or the firewall in front of it, resets the connection, cuts the TLS handshake or never answers. On the client this shows as ConnectionResetError, Connection aborted or a timeout. RFC 9110 also notes that not every overloaded server returns 503; some may simply refuse the connection.

A proxy changes the shape of this signal. With a plain HTTP target, a proxy that cannot reach the target usually returns 502 or 504. With an HTTPS target, the client first opens a CONNECT tunnel. Once the tunnel is up, a connection the target cuts shows up on your side as a closed connection. In our test, a connection reset by the target arrived as ConnectionError on a direct request and as 502 through our local HTTP proxy.

One reset is not a block. It is a signal when it repeats on the same target and only from certain addresses.

One IP or the whole pool

You find out whether the block is on a single IP or on all your addresses by sending the same request from another IP. With a Rotating Proxy, each new connection gets a different exit IP. In a sticky session, changing the session ID does the same job. This is a diagnostic step: you send a few requests to locate the problem, not to get past a limit.

bash
curl -sL -o /dev/null \
  -w "%{http_code} %{size_download} %{url_effective}\n" \
  -x http://user:pass@pr.proxynet.io:8000 \
  https://example.com/product/1

The command prints the status code, the number of bytes downloaded and the final address after redirects on one line. Put the lines side by side.

  • Broken on one IP only, the others normal. The block is specific to that address. The cause may be the address's history or the volume of requests from it. We explained how address history is scored in What Is IP Reputation.
  • The same signal on every IP. The problem is not the IP. The site is reacting to the request itself, your account or your total rate. Changing IPs will not help here.

The site, the network or your own bug

If every IP has the problem, run two more checks. The first is a request without the proxy: open the same URL from your own connection in a browser or with curl. The second is another target: go through the same proxy to a page you know works.

ObservationLikely sourceNext step
Same error without the proxyThe site or your requestCheck the site's status and your code
Fine without the proxy, error on every proxy IPThe site is closed to this network type or locationRead the terms of use, look for an API
Other sites fail through the proxy tooProxy connection or credentialsCheck 407, the port and the password
Fine in the browser, error in codeYour own requestCompare headers and cookies

Your own bug is the source people miss most. Three situations look like a block but come from the request:

  • Missing cookie. The site first sets a session or language cookie, and later pages expect it. A client that does not keep cookies lands on the login or welcome page every time. In Requests, a Session object carries cookies for you.
  • Broken header. A hand-written Host, a wrong Content-Type or an Accept-Encoding asking for compression you cannot decode corrupts the body or returns 400. If the body is unreadable, strip the headers down first.
  • Stale address. A page that moved returns 404 or a redirect to the home page at the old URL. That is not a block; it is an outdated URL list.

Classifying responses in Python

The function below turns the result of each request into a single label. The labels match the signals above and can be counted in your logs. The function does not get past a block; it only tells you what happened.

python
from urllib.parse import urlsplit

import requests

PROXY = "http://user:pass@pr.proxynet.io:8000"
CHALLENGE_WORDS = ("captcha", "verify you are human", "unusual traffic", "access denied")
LOGIN_PATHS = ("/login", "/sign-in", "/signin")


def classify(url, resp=None, exc=None, marker=None, min_len=2000):
    """Turn the result of a request into a (label, detail) pair."""
    if exc is not None:
        if isinstance(exc, requests.exceptions.ProxyError):
            kind = "proxy_auth" if "407" in str(exc) else "proxy_error"
            return kind, type(exc).__name__
        if isinstance(exc, requests.exceptions.Timeout):
            return "timeout", type(exc).__name__
        if isinstance(exc, requests.exceptions.ConnectionError):
            return "connection_reset", type(exc).__name__
        raise exc

    code = resp.status_code
    if code == 407:
        return "proxy_auth", "proxy username or password"
    if code == 429:
        return "rate_limited", "Retry-After: " + resp.headers.get("Retry-After", "none")
    if code == 403:
        return "forbidden", ""
    if code == 503:
        return "temporary_error", "Retry-After: " + resp.headers.get("Retry-After", "none")
    if code in (502, 504):
        return "gateway_error", "proxy got no response from target"
    if code >= 400:
        return "other_error", str(code)

    asked, final = urlsplit(url).path, urlsplit(resp.url).path
    if resp.history and final.startswith(LOGIN_PATHS) and not asked.startswith(LOGIN_PATHS):
        return "login_redirect", resp.url

    body = resp.text
    if marker is not None and marker in body:
        return "ok", f"{len(body)} chars"
    if any(word in body.lower() for word in CHALLENGE_WORDS):
        return "challenge_page", f"{len(body)} chars"
    if len(body) < min_len:
        return "short_body", f"{len(body)} chars"
    if marker is not None:
        return "marker_missing", "expected marker not on page"
    return "ok", f"{len(body)} chars"


def fetch(session, url, **kw):
    try:
        resp = session.get(url, timeout=(5, 20))
    except requests.exceptions.RequestException as exc:
        return classify(url, exc=exc, **kw)
    return classify(url, resp=resp, **kw)


if __name__ == "__main__":
    s = requests.Session()
    s.proxies = {"http": PROXY, "https": PROXY}
    s.headers["User-Agent"] = "ExamplePriceBot/1.0 (+https://example.com/bot)"
    for i in range(1, 4):
        url = f"https://example.com/product/{i}"
        label, detail = fetch(s, url, marker='itemprop="price"')
        print(f"{label:<20} {detail:<40} {url}")

The order is deliberate. marker is the positive marker and is checked first. If the marker is on the page, the response is normal, even if the body contains the word "captcha". That way a product page with a CAPTCHA on its review form is not counted as a block. Set min_len to the baseline of your own pages.

Order matters on the exception side too. In Requests, ProxyError and the connect timeout are subclasses of ConnectionError. So they are checked first. With an HTTPS target, a proxy authentication error arrives as an exception, so the function looks for 407 in the ProxyError message.

Log the labels with the time and URL. If the share of one label suddenly rises, a block has just started.

What to do when you see a block

When you see a block signal, the first move is to stop. Carrying on at the same rate, or switching IPs and retrying, ignores the limit the site has set.

  1. Lower the rate. Halve the concurrency per domain and double the interval between requests. We explained the logic behind the setting in How to Set Your Scraping Request Rate.
  2. Respect Retry-After. The header comes as seconds or as an HTTP date. If the wait is very long, leave the job for the next run.
  3. Read robots.txt and the terms of use. Under RFC 9309, robots.txt is not access control; it is a preference the site owner writes for crawlers. Follow that preference. If the terms of use forbid automated access, stop collecting data.
  4. Look for an official API. Many sites offer the same data through a documented API with quotas. An API states its limits, so you do not have to guess them.
  5. Write to the site owner. Identify your bot in the User-Agent. If needed, ask for permission or a higher quota.

Do not build a retry loop for 403 or a challenge page. These two signals are about an access decision, not about speed. Repeating the same request unchanged will not change the result.

How we tested

We ran the function on 1 December 2026 on Windows 11 with Python 3.13 and Requests 2.34.2. A local test server offered a separate address for each signal: 403, 429 with Retry-After: 30, 503, a challenge page, a short body, a page without the marker, a /login redirect, a connection reset and a response delayed by 3 seconds. We requested each address directly and through a local HTTP proxy that required user:pass. For the test, we replaced the proxy address and URLs in the example with these local addresses.

All ten addresses got the expected label. For the delayed response we lowered the read timeout to 1 second, and the timeout label came back. The only difference was the reset: connection_reset on the direct request, gateway_error (502) through the proxy. A wrong password returned 407 with a plain HTTP target. With an HTTPS target, the same error arrived as a ProxyError during the tunnel stage and got the proxy_auth label. A closed proxy port gave proxy_error. We also ran the curl command with curl 8.23.0 in the same local setup.

The bottom line

Do not look at the status code alone: confirm the body with a positive marker, and locate the source of a block with another IP, a request without the proxy and another target. This reading does not depend on the proxy type; with Residential Proxy the same signals mean the same thing. Above all, do not treat a block as a cue to switch IPs: the right response is to slow down or stop.

Sources

Frequently asked questions

How do I know if my proxy IP is blocked?

By looking at the status code, the body and the final address of the response together. 403, 429 and a lasting 503 are open signals. A challenge page with a 200 code, a shorter body than expected and a redirect to the login page are silent signals. Then try the same request from another IP. If only that IP is broken, the block is specific to that address.

Is a 403 error always an IP block?

No. 403 says the server understood the request and refused access; it does not say why. The page may be members only, a header in the request may have been rejected, or the site may be closed to your region. Try the same URL without the proxy and from another IP. If 403 comes from everywhere, the problem is not the IP but the request or the site's access rule.

Does a 200 code mean the page loaded correctly?

No. Some sites send a challenge or block page with a 200 code. Look for an element you expect in the body, such as the price field. If the element is missing, the response is not data. Compare the body size with a normal fetch. If there was a redirect, check whether the final address is the login page.

Does a 407 error come from the site?

No, it comes from the proxy. 407 Proxy Authentication Required says the proxy did not accept your credentials, and the target site never saw the request. Check the username, the password and the encoding of special characters in the password. With an HTTPS target, most libraries report this as a tunnel error. In Requests it is a ProxyError exception.

Should I switch IPs and keep going when I get blocked?

No. Switching IPs is for diagnosis only: it shows whether the problem is on one address or across the whole pool. If the block says a limit was exceeded, the right response is to lower the rate and respect Retry-After. When you get a 403 or a challenge page, stop, check robots.txt and the terms of use, and use the official API if there is one.

How long does an IP block last?

The site decides, and often does not say. The Retry-After header in 429 and 503 responses, when present, gives the wait as seconds or a date. Without the header, make sparse attempts with exponential backoff. For 403 and challenge pages, no wait time is defined. Retrying without changing your rate and method will not change the result.

Ask ChatGPTAsk Claude