Python requests: HTTPSConnectionPool(host='api.example.com', port=443): Max retries exceeded with url: /v1 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] ...')))
The requests call failed during the TLS step and exhausted its retries; the real reason is in the nested SSLError text.
HTTPSConnectionPool Max retries exceeded with url Caused by SSLErrorrequests.exceptions.SSLError: HTTPSConnectionPoolMax retries exceeded with url (Caused by SSLError(SSLCertVerificationErrorrequests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED]Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] Meaning
Read the bracketed text: CERTIFICATE_VERIFY_FAILED means trust, WRONG_VERSION_NUMBER means port/protocol, EOF means the peer closed, tlsv1 alert means protocol mismatch. Fix according to that cause; avoid verify=False except in short local tests.
Common causes
- Missing/old CA bundle (certifi)
- Corporate proxy with its own root
- Server using an unsupported TLS version
- Wrong URL scheme/port
- Self-signed server certificate
⚡ Quick fix
- Update
certifiandrequests - Set
REQUESTS_CA_BUNDLE=/path/ca.pemfor corporate CAs - Use the nested message to pick the right fix from the pages above
Detailed fix by platform
Python
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt python app.py
How to diagnose
- Nested — Which SSL reason?
- Bundle — Updated?
- Proxy — Involved?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 1003 Cloudflare Error 1003: Direct IP access not allowed
- 1013 Cloudflare Error 1013: HTTP hostname and TLS SNI hostname mismatch
- AH01909: server certificate does NOT include an ID which matches the server name Apache: [ssl:warn] AH01909: example.com:443:0 server certificate does NOT include an ID which matches the server name
Most viewed in SSL / TLS
- NET::ERR_CERT_COMMON_NAME_INVALID NET::ERR_CERT_COMMON_NAME_INVALID: Your connection is not private (certificate is for a different domain)
- Challenge failed for domain Let’s Encrypt / Certbot: Challenge failed for domain example.com — Invalid response from http://example.com/.well-known/acme-challenge/x: 404
- no start line OpenSSL: unable to load certificate / PEM routines:get_name:no start line (key values mismatch)
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 4 Nov 2026