verify=False makes it work
Check The request passes but accepts any certificate, including a forged one.
Fix Replace it with the right CA file once the test is done.
Stop when Stop using it for anything that carries logins or personal data.
Updated
curl -x http://USER:PASS@HOST:PORT https://ipinfo.io/json
Read the SSLError text, decide whether it is the CA list, a re-signing proxy or the clock, and fix that without turning verification off.
CERTIFICATE_VERIFY_FAILED with unable to get local issuer certificate means Python does not have the CA that signed the chain. A message that the hostname does not match means the certificate belongs to a different name. If the traceback starts with ProxyError, the failure is on the leg to the proxy, so check host, port and protocol before touching certificates.
Remember that requests uses certifi's bundle, not necessarily the operating system store. A site that opens in your browser can still fail in Python for exactly that reason.
| Item | What you see | Fix |
|---|---|---|
| Old CA list | CERTIFICATE_VERIFY_FAILED on one site, browser opens it fine | pip install --upgrade certifi requests |
| TLS inspection on your network or device | Every HTTPS site fails behind this network; browser shows the company or security product as issuer | Get the root CA as a PEM file and set verify= or REQUESTS_CA_BUNDLE |
| HTTPS proxy with its own certificate | Error mentions the proxy; you wrote https:// in the proxy URL | Use the proxy CA file, or switch to an http:// proxy URL for a normal tunnel |
| Wrong proxy URL or protocol | ProxyError or connection errors, not a certificate message | Fix scheme, host, port (HTTP 2222, SOCKS5 3333 on Proxy302) |
| Wrong date or time | Certificate has expired or is not yet valid, on every site | Correct the clock, then rerun |
Compiled on 20 November 2026 from the Requests documentation; the fixes are the ones it describes (verify, REQUESTS_CA_BUNDLE, certifi).
import requests
proxies = {
"http": "http://LOGIN:PASSWORD@HOST:PORT",
"https": "http://LOGIN:PASSWORD@HOST:PORT", # the proxy URL scheme stays http://
}
# Where does requests look for trusted CAs right now?
from requests.utils import DEFAULT_CA_BUNDLE_PATH
print(DEFAULT_CA_BUNDLE_PATH)
# Normal case: default verification, certifi bundle
r = requests.get("https://ipinfo.io/json", proxies=proxies, timeout=(10, 30))
print(r.status_code, r.text[:200])Example only: replace LOGIN, PASSWORD, HOST and PORT with the values from your proxy page. The proxy URL starts with http:// even for the https key; that is how Requests describes an HTTP proxy.
import requests
proxies = {
"http": "http://LOGIN:PASSWORD@HOST:PORT",
"https": "http://LOGIN:PASSWORD@HOST:PORT",
}
# Something on your side re-signs TLS: trust ITS root CA for this session
s = requests.Session()
s.proxies.update(proxies)
s.verify = "/path/to/inspection-root-ca.pem" # PEM file from your IT team or tool
print(s.get("https://ipinfo.io/json", timeout=(10, 30)).status_code)
# Same idea without touching code (shell):
# export REQUESTS_CA_BUNDLE=/path/to/inspection-root-ca.pem
# python your_script.pyExample only. The PEM file is the root CA of the product or team that inspects your traffic. REQUESTS_CA_BUNDLE replaces the list, so use a bundle that also contains the public CAs you need.
Run pip install --upgrade certifi requests. The Requests docs recommend upgrading certifi frequently.
Expected result The error disappears if the CA list was just old.
Print requests.utils.DEFAULT_CA_BUNDLE_PATH. If REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE is set in your shell or container, it overrides the default.
Expected result You know which file is used.
Open the same URL in a browser or run curl -v through the same proxy and read the issuer. A security product or company name means you need its root CA file.
Expected result You know whose CA is missing.
Use verify="/path/ca.pem" or session.verify, or export REQUESTS_CA_BUNDLE. Note that the prepared-request flow does not read the environment variable unless you merge environment settings.
Expected result The request succeeds with verification still on.
Before continuing Never ship verify=False to production.
Check The request passes but accepts any certificate, including a forged one.
Fix Replace it with the right CA file once the test is done.
Stop when Stop using it for anything that carries logins or personal data.
Check Browsers use the system store, Requests uses certifi.
Fix Upgrade certifi or point verify at the CA file.
Stop when If the browser warns too, the site or the clock is the issue.
Check You may be using a prepared request, or the variable is set in another shell.
Fix Set verify on the session, or merge environment settings.
Stop when If it still fails, print the path and test with curl.
Check Plain requests does not include SOCKS support.
Fix Install requests[socks] and use socks5h:// if the proxy should resolve names.
Stop when If you only need HTTP, use the HTTP port.
Open My assets and copy HOST, PORT, USERNAME and PASSWORD.
Build the proxy URL as http://USERNAME:PASSWORD@HOST:PORT for the port that matches the asset protocol (HTTP 2222; for SOCKS5 use socks5h:// and port 3333 with requests[socks]).
Request https://ipinfo.io/json with the default verification and a timeout. The exit IP in the answer confirms the proxy works.
Because something between you and the site changes the certificate chain Python sees, usually inspection software, or the proxy URL is wrong. Without that layer, the public CA list is enough.
True uses the certifi bundle, a path uses the CA file you give it, and False accepts any certificate and ignores hostname mismatches and expired certificates.
Requests reads certifi unless you point it elsewhere, so a system-store change may not help. Passing the file through verify or REQUESTS_CA_BUNDLE is the documented route.
Hiding InsecureRequestWarning does not restore the protection. Fix the CA instead.
Run curl -v -x http://LOGIN:PASSWORD@HOST:PORT https://ipinfo.io/json and compare the issuer line with a direct run.
Setup guides Proxy302 publishes on GitHub on the same topic:
Official documentation · Confirmed on:
Read on 20 November 2026: Requests verifies HTTPS certificates by default and raises SSLError; verify accepts a path to a CA bundle; REQUESTS_CA_BUNDLE then CURL_CA_BUNDLE can set it; verify=False accepts any certificate and the docs warn it exposes you to man-in-the-middle attacks; certificates come from certifi, which the docs recommend upgrading often; using a proxy for https typically needs the local machine to trust the proxy's root certificate; proxy URLs must include the scheme; SOCKS needs requests[socks] and socks5h resolves names on the proxy; the prepared-request flow ignores REQUESTS_CA_BUNDLE.
Official documentation · Confirmed on:
Read on 20 November 2026: curl verifies by default and its page advises never skipping verification in production; useful for testing the same proxy outside Python.
Product observation · Confirmed on:
Product facts file of the site (values checked against the console, the backend and the price table on 18-19 October 2026): products, prices in US$ (1 PTC = US$1), lease terms, protocols and ports, countries, quantity limits, no free trial.
Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.