r/WebScrapingInsider • • 12d ago

Blocked Again Why your scraper gets a 403 before a single header is read: JA4 numbers for Python, curl and Chrome

Disclosure: we're a team at a residential proxy provider. No product names or links, just measurements.

If your scraper sends perfect Chrome headers from a clean residential IP and still gets a 403 or a challenge page, the block often happened before your headers were read: at the TLS handshake. JA3/JA4 hash the ClientHello (cipher list, extensions, ALPN), and different clients look nothing alike. Same machine, same target:

- Python urllib (3.14): 18 cipher suites, no ALPN at all

- curl 7.87 (OpenSSL build): 31 cipher suites, offers h2

- Chromium: 15 cipher suites plus GREASE, offers h2

So "Chrome UA + Python TLS" is a mismatch before a single header is read. A few things we learned the hard way:

  1. A residential IP doesn't fix it. A normal HTTP/SOCKS proxy just tunnels your bytes (CONNECT), so the target sees your client's ClientHello, not the proxy's. The IP and the handshake are separate signals.
  2. JA4 is harder to dodge than JA3. Chrome shuffles its extension order on every connection, which broke JA3 (one browser, endless hashes). JA4 sorts before hashing, so shuffling no longer hides you, and a non-browser handshake stays recognizable.
  3. HTTP/2 is the next fingerprint. SETTINGS values, window update size and pseudo-header order (Chrome sends :method, :authority, :scheme, :path) all identify the client. Matching TLS but not HTTP/2 still stands out.
  4. HTTP/3 is easy to get backwards. Some libraries now impersonate h3/QUIC too, and QUIC has its own fingerprint (JA4 starts with "q" instead of "t"). But Chrome doesn't use h3 through an HTTP or SOCKS proxy, since those can't carry UDP, so it falls back to h2. Behind a proxy, h2 is what a real browser looks like; h3 impersonation only matters on direct connections.

Real example: on a Cloudflare-protected site a plain client got the 403 "Just a moment" page, and the same page with a Chrome-like TLS + HTTP/2 fingerprint came back 200, no headless browser.

Quick way to check your own stack: point it at any TLS echo service (browserleaks has a TLS page) and compare the JA4 with what your real browser shows on the same page.

Curious what others see: has anyone measured how often sites actually block on JA4 alone vs. JA4 combined with HTTP/2 or behavior?

3 Upvotes

8 comments sorted by

2

u/Imaginary-Formal7581 11d ago

I was facing a similar issue recently with an Akamai-protected website. The same residential proxy worked consistently in Chrome, but Python kept getting blocked. Even after matching the TLS and HTTP/2 fingerprint parameters as closely as possible with Chrome, Python still failed while Chrome worked. It made me wonder if Akamai was looking at other signals beyond TLS and HTTP/2. Have you seen similar behavior with Akamai, or is it mostly with Cloudflare?

3

u/LudaxProxy 11d ago

Yes, Akamai more than Cloudflare in our experience. Since the same proxy works in Chrome, the exit is the same for both, so it's not the network side here. The usual gap is the sensor: Akamai's script runs in the page, collects browser and behavior data and posts it back, and the _abck cookie only becomes valid after that. Python never runs that script, so even with a near-perfect TLS and h2 match the cookie stays invalid and the protected endpoints keep refusing.

The network side does come back once you split the work. The sensor reports the browser's OS, and Akamai can compare that with the OS the exit's TCP stack shows (p0f style). So if you let a real browser get the cookie and reuse it from Python, keep the same sticky exit, and make sure the browser profile's OS matches what that exit looks like. Quick check on the cookie itself: a valid _abck usually has "~0~" in it.

1

u/Imaginary-Formal7581 11d ago

That's an interesting point about the Akamai sensor and _abck cookie. I did notice Akamai setting those cookies in Chrome, but I haven't isolated whether the Python failure was due to the sensor/session state or another fingerprint mismatch. Have you found a reliable way to distinguish between the two during troubleshooting?

1

u/LudaxProxy 10d ago

Easiest way we've found is to swap one thing at a time from a session that works. Load the page in real Chrome on the same sticky exit, copy its cookies (_abck, bm_sz, ak_bmsc) into the Python session with the exact same UA, and hit the same endpoint. If Python now gets through, it was the sensor/session side. If it still fails with cookies Chrome just earned, the request itself is being flagged, so look at TLS, h2 and header order.

Two other tells: a fingerprint block usually hits on the very first request, before any cookie exists, often as the plain "Access Denied" page with a reference number. A sensor problem tends to show up later: the HTML loads but the API or form endpoints start failing, and the _abck you're holding still has "~-1~" instead of "~0~".

1

u/Pristine_Look_4091 10d ago

were you getting a hard 403 right away on the first request, or was it failing after the initial script challenge?

1

u/Fickle-Elephant-2000 8d ago

rarely see blocks on JA4 alone unless the hash is on a hard blocklist for default scripting libraries. usually its the mismatch between the User-Agent header and the TLS/H2 signature that actually triggers the challenge.

1

u/LudaxProxy 8d ago

Same experience here. The default library hashes are the exception because they're cheap to score, and everything else gets judged against what the client claims to be. One mismatch that's easy to miss: JA4 doesn't include supported_groups, so an older Chrome build and a current one can share the same hash while only the current one sends the post-quantum key share. A User-Agent saying Chrome 131+ without X25519MLKEM768 is a contradiction a matching JA4 won't show you, so we check the key share separately from the hash.

1

u/Alternative-Ruin275 4d ago

A Chrome-versus-Python comparison changes several variables at once: TLS, HTTP/2, JavaScript execution and session state. Using the same exit removes one variable, but doesn't isolate JA4. A 403 by itself also doesn't tell you which signal triggered the decision.

For a site you control or have permission to test, correlate a small set of requests with the server/WAF decision logs: same endpoint, method and timing, with a request ID for each attempt. Separate TLS connection failures from HTTP refusals, then change one variable at a time. Without those logs, I'd label the cause a hypothesis rather than conclude it's JA4 or the sensor cookie.