No KYC — no ID, no selfie, no documents. Pay in crypto: BTC, USDT, USDC, ETH, SOL, LTC
Language: English
Get started

Proxy error reference · Connection and TLS errors

SSL CERTIFICATE_VERIFY_FAILED via a proxy

TLS certificate error in the client: the exact message in each tool, the likely causes in order, and the fix that works.

Last updated: · 4 min read

Quick answer

What does SSL: CERTIFICATE_VERIFY_FAILED mean with a proxy?

CERTIFICATE_VERIFY_FAILED means your client could not validate the website's TLS certificate. Through a CONNECT proxy such as the CrawlRelay gateway, TLS runs end to end, so the proxy does not cause it. Look on your side: an outdated CA bundle, antivirus or an office firewall that inspects HTTPS, or a wrong system clock. Never fix it with verify=False in production.

SSL: CERTIFICATE_VERIFY_FAILED at a glance

ErrorSSL: CERTIFICATE_VERIFY_FAILED
TypeTLS certificate error in the client
Sent byYour TLS library, when it cannot validate the website's certificate
Defined inX.509 path validation: RFC 5280; TLS 1.3: RFC 8446
Retry it?No. Fix the trust store or the network
First checkTest the same URL without the proxy on the same machine

What does SSL: CERTIFICATE_VERIFY_FAILED mean?

During the TLS handshake, the website sends a certificate chain. Your client checks it against a list of trusted authorities, the trust store, and checks names and dates. If any check fails, it stops.

With a CONNECT tunnel, the proxy passes the handshake through untouched, so the certificate you see is the website's own. Something that inserts its own certificate, like inspection software, or a stale trust store on your machine, is the usual cause.

What does CERTIFICATE_VERIFY_FAILED look like in Python, curl, Node.js and browsers?

The same failure prints differently in every tool. These are the messages to search your logs for:

  • Python: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
  • Node.js: UNABLE_TO_GET_ISSUER_CERT_LOCALLY or SELF_SIGNED_CERT_IN_CHAIN
  • curl: curl: (60) SSL certificate problem: unable to get local issuer certificate
  • Browsers: NET::ERR_CERT_AUTHORITY_INVALID

What causes CERTIFICATE_VERIFY_FAILED?

Most likely first:

  • An outdated CA bundle, for example an old certifi package in Python.
  • HTTPS inspection by antivirus, a corporate firewall or a debugging proxy, which presents its own certificate.
  • A wrong system clock that makes valid certificates look expired or not yet valid.
  • A website with a broken chain, missing an intermediate certificate.
  • A container image without the system CA certificates package.

How do I diagnose CERTIFICATE_VERIFY_FAILED step by step?

  1. Run the same request without the proxy. If it also fails, the proxy is not involved.
  2. Print the certificate issuer with openssl s_client or curl -v: an issuer named after your antivirus or firewall shows interception.
  3. Check the system date and time.
  4. Update the CA bundle and test again.
Test the failing URL with curl (HTTP port, verbose)
# Use the URL that fails; with https://api.ipify.org instead, you test the gateway alone.
# "HTTP/1.1 200 Connection established" first, then the site's own status: the site answered.
curl -v -x http://USERNAME:[email protected]:7777 https://TARGET_URL

# Same test through the SOCKS5 port, with DNS resolved at the exit
curl -v --socks5-hostname gw.crawlrelay.com:7778 --proxy-user USERNAME:PASSWORD https://TARGET_URL

How do I fix CERTIFICATE_VERIFY_FAILED?

  • Update certifi (pip install -U certifi) or your system CA package.
  • Add your company's inspection certificate to the trust store if your network requires inspection, or run the scraper outside that network.
  • Fix the clock with network time sync.
  • Install CA certificates in slim container images, for example the ca-certificates package.
  • Do not disable verification in code that sends credentials or collects data you rely on.

Should I retry after CERTIFICATE_VERIFY_FAILED?

Do not retry: the same trust store fails the same way. Fix the trust store, the clock or the network path, then run again.

How does SSL: CERTIFICATE_VERIFY_FAILED apply to CrawlRelay?

CrawlRelay's HTTP port tunnels HTTPS with CONNECT, so the certificate your client checks is the one the website sends. If the error appears only through the gateway and never without it, contact support with the target hostname and the full error so we can check the exit side.

Gateway: gw.crawlrelay.com, port 7777 (HTTP, HTTPS through CONNECT) and port 7778 (SOCKS5). Username format: USERNAME-country-{cc}-state-{state}-city-{city}-zip-{zip}-asn-{asn}-session-{id}-ttl-{minutes}. Related: SSL: WRONG_VERSION_NUMBER · Connection reset · Python guide.

SSL: CERTIFICATE_VERIFY_FAILED: questions developers ask

Can a proxy cause SSL certificate errors?

An intercepting proxy can, because it presents its own certificate. A CONNECT tunnel proxy cannot, because it only forwards encrypted bytes and never sees the handshake contents. Run the same request without the proxy: if the error remains, the cause is on your machine or network.

Is verify=False safe for scraping?

Not as a fix. It hides interception and broken chains, and an attacker on the path could then read or change your traffic, including tokens and cookies. Use it only for a quick local test, and never in a job that runs unattended or sends credentials.

Why does it fail in Docker but work on my laptop?

Slim container images often ship without CA certificates, so no certificate can be validated. Install the system CA package in the image, or rely on the certifi bundle in Python. Also check that the container clock is correct.

Other proxy errors in this reference

HTTP status codes

Browser and client errors

Connection and TLS errors

Residential proxies with docs that cover the failure cases

CrawlRelay residential proxies from $0.50/GB, traffic that never expires.

From $0.50/GB · no KYC

Get started