We use Google Analytics and PostHog to see which pages bring in customers and where visitors get stuck. Until you agree both run without cookies — they count the pages you open and what you click, but cannot recognise you across visits. Agreeing lets them use cookies, so we can tell repeat visitors apart, lets PostHog record a replay of your visit, with anything you type hidden, and loads OpenAI’s measurement pixel, which shows us whether a visit came from one of our ads in ChatGPT. Nothing is sent to OpenAI until you agree. Either way we never build advertising profiles or target ads. Privacy Policy

15% off your first purchase with code WELCOME15, up to 25 GB.

See pricing

Guide · Scraping practice

403 Forbidden through a proxy: is it the IP, the fingerprint or the site?

First find out who sent the 403. If the proxy refused your CONNECT (curl prints CONNECT tunnel failed, response 403, requests raises a ProxyError), the website never saw you and the cause is the target, port or plan you asked for; a 407 instead means your proxy credentials. If the tunnel opened and the website answered 403, the cause is the site's own rules, the exit IP, your client's fingerprint, or a challenge that needs a real browser, and comparing the same request without the proxy, through it, and from a browser through the same exit tells you which. A proxy changes only the IP, so it fixes only the IP case.

Reviewed 19 Nov 2026

The short answer

  • Check the proxy's answer before the website's: curl's %{http_connect} is the proxy's status, %{http_code} the site's. In our local test a refused tunnel gave 403 and 000.
  • For a plain http:// URL a proxy's 403 arrives as an ordinary response in requests (status 403, no exception), so read the headers before you blame the site.
  • server: cloudflare, cf-ray, datadome, incap_ses_ or _px cookies tell you which service fronts the site, not why you were refused. cf-mitigated: challenge is Cloudflare's documented marker for a challenge page.
  • A browser User-Agent string does not make requests look like a browser: we saw it offer only HTTP/1.1, and its TLS handshake stays Python's. JA3/JA4 and HTTP/2 fingerprints are read from the connection, not from headers.
  • If a browser through the same exit IP gets 200, the IP is fine and the cause is your client. If the browser gets 403 too, it is the IP, the region or the site.
  • A proxy fixes only the IP part. ARC does not get you past a bot-management challenge, and a challenge is a site telling you it does not want automated clients.

First question: did the proxy or the website send the 403?

For an HTTPS page your client first asks the proxy to open a tunnel with CONNECT host:443. RFC 9110 says any 2xx answer opens the tunnel and any other answer means no tunnel was formed, so a 403 at that step comes from the proxy and the website never received a request. The HTTP CONNECT glossary entry shows the exchange.

RFC 9110 also tells proxies to restrict CONNECT to known ports or a list of safe targets, with the example that an open CONNECT to port 25 could be used to relay spam. A proxy's 403 therefore usually means the port, the target or your plan is not allowed, not that the website dislikes you. Our acceptable use policy lists what ARC may not be used for.

Reproduced on 2026-11-19 against a local proxy that refuses every tunnel with 403: requests 2.34.2 raised ProxyError(... OSError('Tunnel connection failed: 403 Forbidden')), and curl 8.7.1 exited with code 56 and curl: (56) CONNECT tunnel failed, response 403. Chrome reports the same situation as ERR_TUNNEL_CONNECTION_FAILED and hides the proxy's body.

What you seeWho answeredWhat it means
curl (56) CONNECT tunnel failed, response 407; requests Tunnel connection failed: 407The proxyMissing or wrong proxy credentials; see CONNECT tunnel failed, 407
curl (56) ... response 403; requests Tunnel connection failed: 403 ForbiddenThe proxyThe proxy refuses this target, port or plan. Retrying will not help
curl (56) ... response 502 or 503The proxyThe proxy could not reach the site; see proxy 502 and 503 errors
%{http_connect} is 200, %{http_code} is 403The websiteRead on: the site refused the request that came out of the tunnel
http:// URL, status 403, no exceptionEitherNo tunnel is used, so the proxy's own 403 looks like the site's. Compare the headers with a known proxy error

The last row caught us in testing: with an http:// URL there is no CONNECT, the proxy relays the request itself, and requests returned the proxy's refusal as status_code == 403 with the proxy's text body. Look at Server and the body before reading anything into it.

Read the website's 403: status, headers, cookies, body

RFC 9110 defines 403 as a server that understood the request and refuses it, and lets the server explain why in the body. MDN adds the practical point: repeating the same request unchanged should be expected to fail again. So keep the whole response (status, headers, cookies and the first few kilobytes of the body) instead of just the number.

Many sites sit behind a CDN or bot-management service, and its markers tell you who produced the page. They appear on successful responses too, so they name the gatekeeper, not the reason:

  • Cloudflare: Cloudflare adds a Cf-Ray header to responses it serves, and server: cloudflare is the usual server value. Its docs name cf-mitigated: challenge as the header that marks a challenge page, which is always text/html, even for an API call.
  • Akamai: a Server: AkamaiGHost header (the marker wafw00f uses), and the bm_sv cookie, which Akamai's own docs describe as a Bot Manager cookie for telling human from automated requests.
  • DataDome: a datadome cookie and X-DataDome response headers, both shown in DataDome's integration docs. The integration returns DataDome's status, for example 403, to the client.
  • Imperva (Incapsula): cookies starting with incap_ses_ or visid_incap_, and "Incapsula incident ID" or /_Incapsula_Resource in the body, per wafw00f's detector.
  • HUMAN (PerimeterX): cookies starting with _px, such as _px3, _pxhd and _pxvid, which HUMAN documents for session and bot detection; block pages may reference perimeterx.net.
  • None of these: the 403 most likely comes from the application or the web server itself. Read the body: a login prompt, a "not available in your country" text or a JSON error is the site telling you directly.

Four causes behind a website's 403

Once you know the site answered, the cause sits in one of four layers. The test in the next sections separates them; the table says what each one looks like.

LayerTypical causesWhat points to itDoes a different proxy IP help?
ApplicationLogin or API key missing, insufficient rights, a required header or Referer missing, content licensed only for some countriesSame 403 without the proxy and from a browser; a readable error page or JSON bodyOnly for geo-blocking, by choosing an exit in an allowed country (see geo-blocking)
IPThe exit's reputation, its network type (ASN, datacenter ranges), its countryDirect works, the proxy gets 403, and a browser through the same exit also gets 403Yes: another exit, another country or another IP type
Client fingerprintTLS handshake (JA3/JA4), HTTP/2 settings, header set and order, a User-Agent that contradicts the rest, such as requests' default python-requests/2.34.2A browser through the same exit gets 200, your script gets 403, with or without the proxyNo. The same client is refused from any IP
Vendor challengeA JavaScript or interactive check the page wants run before it serves contentcf-mitigated: challenge or a vendor block page; a browser sees a short interstitial, then the pageNo. It wants a browser, not a different address

Several layers can be in play at once: a site can refuse a datacenter range and also challenge clients without JavaScript. That is why the test changes one thing at a time.

Why a browser User-Agent does not make requests look like a browser

Copying a Chrome User-Agent into requests changes one header. On our local test server requests 2.34.2 still sent only User-Agent, Accept-Encoding: gzip, deflate, Accept: */* and Connection: keep-alive, in that order, and offered only http/1.1 during the TLS handshake, where curl 8.7.1 offered h2. A current Chrome sends a longer header set, negotiates HTTP/2 and, like other Chromium-based browsers, sends Sec-CH-UA client hints by default (MDN). A request claiming to be Chrome without any of that contradicts itself.

The TLS layer is read before any header. Cloudflare's docs describe JA3 and JA4 as fingerprints of how a client starts the TLS connection, stable across destinations, and usable in its rules to block or challenge a specific fingerprint. Akamai researchers showed in 2017 that HTTP/2 clients can be told apart passively by their SETTINGS, WINDOW_UPDATE and PRIORITY frames and pseudo-header order. Neither changes when you swap the User-Agent string or the proxy.

So the honest summary is: if the cause is the client, the remedy is a client that the site accepts, usually a real browser through Playwright, and only where the site's terms allow automated access. The test below uses a visible window rather than a headless browser, so you see what a person would see, including any challenge.

A four-run test that isolates the cause

Change one variable per run and keep the rest fixed. Use a sticky session for every proxied run, because a rotating username means each new connection can get a different exit IP, and you want the script and the browser to leave from the same address. The same _session- handle returns the same exit IP for the time you set; an exit can still go offline early, so compare the printed IPs.

  • Run A, script without proxy. Your own IP, your real client. This is the baseline.
  • Run B, script through the proxy. Same client, the exit IP changes. Print the exit IP, ASN and country with https://api.arcproxy.cloud/api/v1/ip?format=json (the what is my IP endpoint; geolocation by DB-IP).
  • Run C, browser without proxy. A normal browser on your own connection. If this gets 403, the problem is not your code.
  • Run D, browser through the same sticky exit. Same IP as run B, a real browser. This is the run that separates IP from fingerprint.
  • Optional run E, script through the proxy with your browser's User-Agent. If this alone flips 403 to 200, the site filtered on the User-Agent string, the simplest case there is.

Before run B, put the proxy string through the proxy tester: it reports a refused tunnel as "The proxy refused the tunnel" with the status, which rules out the proxy-side 403 in one step. The proxy location checker confirms the exit is in the country you asked for, which matters when the 403 is a regional block.

Decision table: what each result means

A: script directB: script via proxyC: browser directD: browser via same exitMost likely causeNext step
200403200403The exit IP: reputation, network type or countryTry another sticky session, another country or another IP type
200403200200Client and IP together: a browser is accepted from this exit, your script only from your own IPFix the client first; the exit itself is not blocked
403403200200Your client fingerprintA different proxy will not help. Use a real browser where allowed
403403403403Application rule or region: login, permissions, licensingRead the body; check whether the content is public and which countries it serves
403403Challenge, then 200Challenge, then 200A vendor JavaScript challengeIt wants a browser. Check the site's terms or look for an official API
AnyProxy error, no statusAnyProxy errorThe proxy refused the tunnel (403) or credentials (407)Check the port, target and plan; see the first section

A 200 in run D with a 403 in run B is the clearest result you can get: the exit IP is acceptable to the site and the difference is entirely in the client. If the 403s come only after many requests, it is closer to rate limiting than to a block; handling 429 rate limits covers backoff, and why rotating proxies get blocked covers what changes when you rotate.

What a proxy can fix, and what it cannot

  • It can change the IP: another exit, another country through _country-, or another network type. If the 403 follows the IP type, compare the residential pool with the ISP-registered addresses of the ISP pool; for a site that needs one address over days, a static ISP IP keeps it.
  • It can show you a region's view: for a licensing or geo-block, an exit in an allowed country is the intended fix, and the location checker proves where you exit.
  • It cannot change your fingerprint: TLS, HTTP/2 and header order travel through the tunnel untouched. The same script is the same client from any IP.
  • It cannot pass a challenge or a login: ARC does not bypass any bot-management system, and we do not offer to. A challenge is the site saying it does not want automated access to that page; respecting robots.txt and the site's terms come before any workaround.
  • It cannot make retries succeed: RFC 9110 says not to repeat a 403 with the same credentials, and MDN that an unchanged request should fail again. Retrying a 403 in a loop only spends bandwidth.

Google's "unusual traffic" page is a separate case with its own causes; see Google unusual traffic error. For the Python side of proxy errors that never reach the site, see requests ProxyError.

Code

Worked example

curl: proxy status, site status, key headers and the exit IP
PROXY="http://USERNAME_pool-arcfast_country-de_session-k3f9a1x2_sesstime-10:PASSWORD@proxy.arcproxies.io:8000"URL="https://example.com/"   # the page that answers 403# 1. The exit this sticky session uses: IP, ASN, countrycurl -sS -x "$PROXY" "https://api.arcproxy.cloud/api/v1/ip?format=json"; echo# 2. Who answered? %{http_connect} = the proxy's answer to CONNECT,#    %{http_code} = the website's. -D - prints both response heads.curl -sS -o body.html -D - -x "$PROXY" "$URL" \  -w 'proxy CONNECT: %{http_connect}  site: %{http_code}  curl exit: %{exitcode}\n' \  | grep -iE '^(HTTP/|server:|cf-ray:|cf-mitigated:|set-cookie:|x-datadome|content-type:)|proxy CONNECT'# Reproduced on 2026-11-19 with curl 8.7.1 against local test servers:# proxy refuses the tunnel -> curl: (56) CONNECT tunnel failed, response 403#                             proxy CONNECT: 403  site: 000  curl exit: 56# tunnel opens, site says no -> HTTP/1.1 200 Connection established#                               HTTP/1.1 403 Forbidden ...#                               proxy CONNECT: 200  site: 403  curl exit: 0# 3. Same request without the proxy, for comparisoncurl -sS -o /dev/null -w 'direct: %{http_code}\n' "$URL"
Python: runs A, B and E with status, vendor hints and exit IP (ran on requests 2.34.2)
import reimport requestsPROXY = "http://USERNAME_pool-arcfast_country-de_session-k3f9a1x2_sesstime-10:PASSWORD@proxy.arcproxies.io:8000"   # sticky: same exit for every callURL = "https://example.com/"                             # the page that answers 403IP_URL = "https://api.arcproxy.cloud/api/v1/ip?format=json"# Who fronts the site. These also appear on 200 responses: they name the# service in front of the site, not the reason for the 403.SERVER = {"cloudflare": "Cloudflare", "akamaighost": "Akamai"}HEADERS = {"cf-ray": "Cloudflare", "x-datadome": "DataDome"}COOKIES = {"datadome": "DataDome", "incap_ses_": "Imperva", "visid_incap_": "Imperva",           "_px": "HUMAN (PerimeterX)", "bm_sv": "Akamai"}BODY = {"incapsula incident id": "Imperva", "_incapsula_resource": "Imperva",        "perimeterx.net": "HUMAN (PerimeterX)"}def vendors(r):    found = set()    server = r.headers.get("server", "").lower()    found |= {v for k, v in SERVER.items() if k in server}    found |= {v for k, v in HEADERS.items() if k in r.headers}    found |= {v for k, v in COOKIES.items() for c in r.cookies.keys() if c.startswith(k)}    body = r.text[:50_000].lower()    found |= {v for k, v in BODY.items() if k in body}    return sorted(found)def run(label, proxy=None, headers=None):    s = requests.Session()    s.headers.update(headers or {})    proxies = {"http": proxy, "https": proxy} if proxy else None    try:        ip = s.get(IP_URL, proxies=proxies, timeout=20).json()        r = s.get(URL, proxies=proxies, timeout=30)    except requests.exceptions.ProxyError as err:        # The PROXY refused the tunnel; the website never saw the request.        print(f"[{label}] proxy refused: {err}")        return    title = re.search(r"<title>(.*?)</title>", r.text, re.I | re.S)    print(f"[{label}] exit {ip.get('ip')} AS{ip.get('asn')} {ip.get('country')}")    print(f"  status {r.status_code}  server={r.headers.get('server')}  "          f"cf-mitigated={r.headers.get('cf-mitigated')}  type={r.headers.get('content-type')}")    print(f"  cookies={list(r.cookies.keys())}  vendor hints={vendors(r)}")    print(f"  title={title.group(1).strip()[:80] if title else None!r}")# Copy the exact string from your own browser (about:version or DevTools).BROWSER_UA = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "              "(KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36")run("A direct")                                        # your IP, your clientrun("B proxy", PROXY)                                  # same client, other IPrun("E proxy + browser UA", PROXY, {"User-Agent": BROWSER_UA})  # same IP, other UA string
Playwright: run D, a real browser through the same sticky exit (not run for this page)
from playwright.sync_api import sync_playwrightURL = "https://example.com/"with sync_playwright() as p:    browser = p.chromium.launch(        headless=False,                       # a visible window: you see any challenge        proxy={            "server": "http://proxy.arcproxies.io:8000",   # credentials as separate fields            "username": "USERNAME_pool-arcfast_country-de_session-k3f9a1x2_sesstime-10",    # the SAME session handle as the script            "password": "PASSWORD",        },    )    page = browser.new_page()    ip = page.goto("https://api.arcproxy.cloud/api/v1/ip?format=json")    print("exit", ip.json() if ip else None)  # must match run B's exit IP    r = page.goto(URL)    print("first response", r.status if r else None, r.headers.get("server") if r else None)    page.wait_for_timeout(8000)              # give an interstitial time to finish    print("after wait", page.url, page.title())    browser.close()

FAQ

Questions

Something not covered? Write to contact@arcproxies.io.

How do I know if the 403 comes from the proxy or the website?

Look at the CONNECT step. curl's -w '%{http_connect}' prints the proxy's answer and '%{http_code}' the site's: 403 and 000 means the proxy refused the tunnel, 200 and 403 means the website refused you. In Python, a ProxyError with 'Tunnel connection failed: 403' is the proxy; a response object with status_code 403 is the website for HTTPS URLs.

What is the difference between a 403 and a 407 from a proxy?

A 407 means the proxy wants valid proxy credentials; fix the username or password and it goes away. A 403 to CONNECT means the proxy understood you but will not open a tunnel to that target or port, so new credentials or retries will not change it.

Why does my request work in the browser but return 403 in Python requests?

Usually because the site recognises the client, not the IP. requests sends a short default header set with a python-requests User-Agent, speaks HTTP/1.1 and has Python's TLS handshake; a browser differs in all of these. Run the browser through the same sticky proxy exit: if it gets 200 there too, the IP is fine and the difference is the client.

Will a residential proxy fix a 403?

Only if the cause is the IP: a datacenter range, an address with poor reputation or the wrong country. If a browser through the same exit gets 200, the IP was never the problem, and if the site serves a JavaScript challenge or wants a login, no proxy changes that.

Does a cf-ray header mean Cloudflare blocked me?

No. Cloudflare adds Cf-Ray to responses it serves, including successful ones, so it only tells you the site is behind Cloudflare. The documented marker for a challenge page is the cf-mitigated: challenge header; without it, read the body to see whether it is a Cloudflare block page or the site's own error.

Should I retry a 403?

Not unchanged. RFC 9110 says a client should not repeat a 403 with the same credentials, and MDN notes that the same request is expected to fail again. Change one thing, such as the exit, the client or the region, and treat a repeated 403 as an answer.

Sources & review

Last reviewed by the ARC Proxies team. Prices are read from the live catalog at build time.

  1. [1]IETF: RFC 9110: HTTP Semantics, 15.5.4 403 Forbidden
  2. [2]IETF: RFC 9110: HTTP Semantics, 9.3.6 CONNECT
  3. [3]MDN Web Docs: 403 Forbidden
  4. [4]Cloudflare: Cloudflare HTTP headers (Cf-Ray in responses)
  5. [5]Cloudflare: Detect a challenge page response (cf-mitigated)
  6. [6]Cloudflare: JA3/JA4 fingerprint
  7. [7]Akamai / Black Hat Europe 2017: Passive Fingerprinting of HTTP/2 Clients (Elad Shuster)
  8. [8]Akamai TechDocs: Cookies and local storage (bm_sv, Akamai Bot Manager)
  9. [9]DataDome: Protection API (datadome cookie, X-DataDome headers)
  10. [10]HUMAN Security: Use of cookies & web storage (_px*, _pxhd, _pxvid)
  11. [11]wafw00f (EnableSecurity): WAF detection plugins: cloudflare.py, incapsula.py, kona.py, perimeterx.py
  12. [12]MDN Web Docs: Sec-CH-UA header

Next

Where to go from here

Use caseProxies for web scraping and data collectionA second provider that just works — Scrapy, requests, Crawlee or Playwright, self-serve, no sales call, bandwidth that never expires.Use caseProxies for price and competitor monitoringSee the price a shopper in Berlin, Lyon or Chicago sees. ISP bandwidth at our lowest price per GB for HTML checks, residential where a marketplace is strict.Use caseResidential proxies for AI agentsBring your own residential IPs to browser-use, Playwright, Crawl4AI, n8n and any MCP tool — one sticky session per task, billed per GB.Guidecurl: (56) CONNECT tunnel failed, response 407curl: (56) CONNECT tunnel failed, response 407 means the proxy rejected your credentials. The fix, and how the same 407 looks in requests, httpx and axios.GuideFix ERR_TUNNEL_CONNECTION_FAILEDnet::ERR_TUNNEL_CONNECTION_FAILED means the proxy refused Chrome's CONNECT. The causes we reproduced in Chromium 156, and the Playwright fix.Guiderequests ProxyError: Max retries exceededrequests.exceptions.ProxyError hides the real cause in its last line. Each variant we reproduced: 407, Connection refused, RemoteDisconnected, SSL.GuideHandling 429 rate limitsWhat HTTP 429 means, how to read Retry-After, and how to retry politely with exponential backoff, jitter and per-host concurrency limits. With code.GuideWhy rotating proxies get blockedBot management scores sessions, not single requests. Why a new IP and User-Agent per request looks less human, and when a sticky or static IP fits.GlossaryIP reputationIP reputation is the assessment that websites, mail servers and security services attach to an IP address or range — based on its observed history of spam, attacks or automated traffic and on what kind of network it belongs to — and use to decide whether to accept, challenge, slow down or refuse its traffic.GlossaryUser-AgentUser-Agent is the HTTP request header in which a client identifies its software — one or more product tokens such as curl/8.5.0, with optional versions and comments — and which RFC 9110 says servers use to diagnose compatibility problems, tailor responses and compile browser and operating-system statistics.Free toolProxy testerExit IP, location, latency per phase, rotation and header anonymity for one proxy, or a quick ping of a long list.Free toolWhat is my IPYour own public IP and network, plus a plain-text IP endpoint for scripts.Free toolProxy location checkerWhere a proxy exits: IP, country, network and whether the address changes between connections.IntegrationPlaywrightSet up an authenticated proxy in Playwright for Python and Node: launch and per-context proxies, sticky sessions, geo-targeting and handling proxy errors.ProductResidentialReal consumer IPs in 185+ countries with city targeting, rotating or sticky, billed per gigabyte with no subscription and no expiry.