SSL certificate errors with a proxy: check time, software and configuration
Updated:
A normal HTTP/HTTPS proxy does not change a website's SSL certificate. When you open an HTTPS page through it, the browser builds a tunnel through the proxy and performs the encrypted handshake directly with the website, so the certificate you see is still the site's real one. That means certificate errors while using a proxy usually come from your own machine: a wrong system clock, antivirus or other software inserting its own certificate, an operating system missing newer root certificates, or code that uses the wrong scheme for the proxy address. This guide helps you find the real cause and fix it without switching certificate checks off.
How an HTTP proxy handles HTTPS
To open https://example.com through a proxy, the browser sends CONNECT example.com:443 to the proxy. The proxy opens a connection to the site and relays data in both directions without being able to read it. The SSL handshake, certificate check and encryption all happen between the browser and the website. The proxy only sees the hostname and the amount of data.
Two things follow. First, a proxy does not make traffic more or less secure than HTTPS already does; it is not a VPN and adds no encryption, as explained in proxy vs VPN. Second, if the certificate you receive is not the website's, some software is sitting in the middle and you need to find it.
Common errors at a glance
| Message | Usual cause | Fix |
|---|---|---|
| NET::ERR_CERT_DATE_INVALID | Wrong date or time on your machine | Turn on automatic time sync |
| NET::ERR_CERT_AUTHORITY_INVALID | HTTPS scanning software or an office network inserting its own certificate | Check the issuer and pause HTTPS scanning |
| SSL: CERTIFICATE_VERIFY_FAILED (Python) | Missing root certificates or an injected certificate in the environment | Update the certificate bundle and check environment variables |
| wrong version number | Proxy address written as https:// when the proxy expects plain HTTP | Use http://ip:port as the proxy address |
| Error on one website only | That site has a certificate problem unrelated to the proxy | Open it without the proxy to compare |
Step 1: check the system clock
Certificates have a start date and an expiry date. If your clock is far off, every certificate looks either not yet valid or expired. This is common on freshly restored virtual machines, computers with a dead CMOS battery, or when someone changes the clock by hand to match a proxy's time zone and gets the time wrong.
Fix it by enabling automatic time sync in Windows or macOS date settings. If you want the browser's time zone to match the proxy country, set it in your antidetect browser profile rather than changing the system clock; see matching time zone and language to your proxy.
Step 2: see who issued the certificate
In Chrome, click the icon left of the address bar, open the connection details and view the certificate. Look at the issuer. If it names an antivirus product, a debugging tool such as Fiddler or Charles, or your employer, that software is decrypting your HTTPS traffic.
Antivirus products with HTTPS scanning install their own root certificate so the browser trusts them. Some of them mishandle tunnels through a proxy and trigger errors. Pause web or HTTPS scanning to test, then add an exception rather than leaving it off. On a company network, talk to IT before using a private proxy on a work machine.
Step 3: SSL errors in code and command-line tools
The most common coding mistake is writing the proxy address with https://. For a standard HTTP/HTTPS proxy, the proxy address is still http://user:pass@ip:port even when the target site uses HTTPS. HTTPS in the proxy type means the proxy can relay HTTPS pages, not that you connect to the proxy over SSL.
A correct example with Python requests:
proxies = {"http": "http://user:pass@ip:port", "https": "http://user:pass@ip:port"}requests.get("https://api.ipify.org", proxies=proxies, timeout=15)- If you still see
CERTIFICATE_VERIFY_FAILED, update thecertifipackage and check whetherREQUESTS_CA_BUNDLEorSSL_CERT_FILEpoint to an unexpected file. - With
curl, compare results with and without-x. If it fails without the proxy too, the proxy is not the cause.
Do not switch off certificate checks
Tricks like curl -k, verify=False or clicking through the browser warning make the error disappear, but they also remove the protection that tells you you are talking to the real website. Use them for a few seconds of diagnosis at most, never in production code and never while logging into accounts. For proper integration, see Python requests with a proxy or Node.js axios.
When to suspect the proxy
A private proxy from a reputable provider has no reason to insert certificates. If you have ruled out the clock, local software and your code, yet certificates are issued by an unknown party only when going through one specific proxy, stop logging into accounts through it and report it to the provider. For VinaProxy proxies, open a ticket with the proxy IP, the website and a screenshot of the certificate details. This is also why random free proxies are a poor choice for important accounts; read more about the risks of cheap proxies.
Frequently asked questions
Can a proxy break SSL certificates?
A normal HTTP/HTTPS proxy only tunnels the connection and does not swap certificates. Errors usually come from the system clock, HTTPS scanning software or local misconfiguration.
Should I click through the certificate warning?
No, especially when logging in. Find the cause first; the warning exists to protect you from interception.
Should the proxy address in code start with http or https?
For a standard HTTP/HTTPS proxy, use http://user:pass@ip:port for both the http and https keys. The target site still uses HTTPS through the tunnel.
Why does only one website show an SSL error?
That site may have an expired or misconfigured certificate. Open it without the proxy to compare before blaming the proxy.
Can changing the time zone to match my proxy cause SSL errors?
Changing the time zone does not, but setting the system clock to the wrong time does. Set the time zone in your browser profile and let the system clock sync automatically.
Private proxies that leave your certificates alone
Dedicated HTTP/HTTPS proxies with fixed IPs and username and password authentication. Automatic activation and 24/7 ticket support.
See pricing