Using a Proxy with HTTPS: Certificate Cautions to Know
A proxy can carry HTTPS traffic without reading it, but certificate warnings deserve attention. Learn what is normal, what is suspicious, and what never to switch off.
9 min readUpdated Nov 13, 2026By XPASS Editorial Team

Most proxy tutorials show how to point a client at a host and port, then move on. When the sites you visit use HTTPS, which today is nearly all of them, an extra layer of questions appears: who is actually presenting the certificate, what can the proxy see, and what should you do when the client suddenly complains about trust? This guide walks through those questions in plain language so that you can use a proxy for lawful work such as website testing, regional page checks and QA without weakening the protection that HTTPS gives you.
The short version is reassuring. A correctly configured proxy normally carries HTTPS traffic as an opaque tunnel and cannot read it. The longer version contains a few places where things go wrong, and almost all of them involve a certificate. Understanding them takes ten minutes and saves hours of confusing debugging.
How HTTPS travels through a proxy
When you request an https:// address through a standard HTTP proxy, your client does not send the request itself to the proxy. Instead it sends a short instruction called CONNECT, which is defined in the HTTP specification (see RFC 9110). The message says, in effect, "please open a raw connection to this host on port 443". If the proxy agrees, it replies with a success status and from that moment simply passes bytes back and forth between your client and the destination.
After the tunnel is open, your client starts the TLS handshake directly with the destination site. The site sends its certificate, your client checks it, and only then is an encrypted session established. The proxy sits in the middle of the pipe but holds no key to the conversation. What it can see is limited to the host name and port in the CONNECT line, the amount of data moved, and the timing. It cannot see paths, headers, cookies, form fields or page content.
This is the reason a plain proxy is compatible with HTTPS in the first place. It is also the reason certificate errors deserve respect: the certificate your client receives should be the destination site's own certificate, issued by an authority that your client trusts. If that stops being true, something has changed in the path.

Three things people call an HTTPS proxy
The phrase is used loosely, and the differences matter for certificates.
- A proxy that tunnels HTTPS. This is the common case described above. The proxy itself might be reached over plain HTTP or over SOCKS, and the HTTPS session is end to end between your client and the site.
- A proxy that you reach over HTTPS. Here the first hop, from your client to the proxy, is wrapped in TLS. The proxy presents its own certificate to your client, and your client must trust it. This protects proxy credentials and the host names you ask for while they travel to the proxy. The traffic to the destination is still tunnelled the usual way.
- An inspection proxy. This kind decrypts and re-encrypts traffic. It terminates TLS for the site, reads the content, and opens a second TLS session to the real site. To avoid warnings it signs the replacement certificates with its own certificate authority, which has been installed on your device in advance. Organisations use this for security scanning on managed devices. It should never appear unexpectedly.
When you read a support article that says "install the proxy certificate", it is describing the third kind. For ordinary website testing and regional checks you should not need to install any extra authority at all.
What a healthy certificate check looks like
Whether you use a browser or a script, the client performs the same checks before it trusts the connection. It is worth knowing them because each one corresponds to a different error message.
- Chain of trust. The site's certificate must chain up to an authority in your trust store. The profile for these certificates is described in RFC 5280.
- Host name match. The name in the certificate must match the host you asked for. A certificate for another domain is rejected even if it is otherwise valid.
- Validity period. The current date must fall between the certificate's start and end dates. A wrong system clock breaks this check in surprising ways.
- Revocation and usage. The certificate must be allowed for server authentication and should not have been revoked.
If a proxy only tunnels, none of these results should change compared with connecting directly. If they do change, the question to ask is what in the path is replacing the certificate.
Common reasons a certificate error appears only with a proxy
Because the tunnel is transparent, a new certificate error after turning on a proxy usually points to one of a short list of causes. Work through them in order.
- The client uses a different trust store. Browsers often use the operating system store or their own. Many programming libraries ship their own bundle of trusted authorities, and an old bundle may not know a newer authority. The same site can then work in the browser but fail in a script.
- An inspection layer is in the path. If you are on a company network, a school network or a security product that scans HTTPS, the certificate you receive comes from that layer, not from the site. Check the certificate issuer. If it names your organisation or a security product, this is expected on that network but your script will not trust it unless you provide the authority file.
- The system clock is wrong. A device whose date is far off will consider valid certificates expired or not yet valid. This is easy to miss on virtual machines and containers.
- You are hitting the wrong host. A typo in the proxy address, or a proxy that refuses the tunnel and answers with an error page, can look like a certificate problem. The client may be reading the proxy's reply instead of the site.
- The destination really has a problem. Expired or misconfigured certificates happen. Test the same address without the proxy from another network to see whether the issue is on the site's side.
A useful habit is to look at the certificate details rather than just the error text. Note the issuer, the host names it lists and the expiry date, then compare them with what you get when you connect without the proxy. Differences are your clue.
Never disable verification as a shortcut
When a script fails with a certificate error, search results offer a quick answer: switch verification off. Many libraries have a single flag for it. The error vanishes and the page loads, so it feels like a fix.
It is not a fix. With verification off, your client will accept any certificate from anyone on the path, including one made up by an attacker or by a misconfigured device. You lose the main guarantee of HTTPS, which is knowing who you are talking to. You also lose the warning that was telling you something was wrong. Credentials, session cookies and API keys you send afterwards are exposed to whatever is in the middle.
The same applies to browser prompts that offer to "proceed anyway". Accepting a warning once for a known test site you control is a judgement call. Making it a permanent habit, or copying a "verification off" snippet into a project and forgetting it, is how weak settings end up in production code.
Safer alternatives, in order of preference:
- Fix the cause: update the trust bundle, correct the clock, or use the correct proxy address.
- If your organisation uses an inspection proxy on purpose, obtain the authority certificate file from your administrator and tell your client to trust that specific file for that environment only.
- For a test site you operate yourself with a private authority, point the client at that authority file rather than turning checks off globally.
A plain example: finding the real issuer
Suppose you run a small script that checks whether a public landing page renders correctly for visitors in another region. Direct requests work. Through the proxy, the script fails with "certificate verify failed: unable to get local issuer certificate".
First, confirm the proxy settings are correct and that the same request works with a command-line tool. If it works there but not in the script, suspect the trust bundle: update the library's bundle or the package that provides it, then retry. If it fails in both, view the certificate that is returned. Open the same address in a browser on the same network and inspect the issuer.
If the issuer is the site's usual public authority, the problem is local to the script and its bundle. If the issuer is something unfamiliar, such as a device name or a security product, stop and find out why traffic is being intercepted. Do not add that authority to your trust store just to silence the message unless you know who controls it and why it is there.
Finally, record what you learned. A short note such as "script X needs the corporate authority file at this path" prevents the next person from reaching for the verification switch.
Handling credentials and the first hop
Many commercial proxies require a username and password. With a plain HTTP proxy address, those credentials travel to the proxy without TLS protection unless the first hop is encrypted. For this reason it is worth asking whether the provider supports reaching the proxy over TLS, and checking the plan page and documentation for the options available.
Whatever the transport, keep the credentials out of source code and logs. A proxy URL that contains a password is easy to paste into a ticket or commit by accident. Our guide on storing proxy credentials securely covers environment variables, secret managers and rotation. When you set up a script with a library, the step-by-step guide to using a proxy with Python Requests shows where the proxy settings and the verification options live, so you can see which setting is which.
Remember that HTTPS protects the content of your requests, not the lookup of host names. Depending on how your client resolves names, the DNS query may happen locally rather than at the proxy, which can reveal which sites you are contacting. The article on how to check for a DNS leak in a proxy setup explains how to test this.
Limits and what to watch for
Certificates are one part of a safe setup, and it helps to be honest about what they do not cover.
- HTTPS does not hide the destination host. The proxy learns the host name from the
CONNECTrequest, and the destination learns the proxy's IP address. A tunnel protects content, not the fact that a connection occurred. - A trusted certificate does not mean a trustworthy site. The check proves identity and encryption, not intentions. A phishing site can have a valid certificate.
- Pinned apps may refuse any inspection. Some mobile apps and clients only accept specific certificates. If you try to inspect or replace the certificate, they will fail by design. That is a feature, not a bug to be defeated.
- Respect the target site and the law. Use proxies for lawful purposes, follow the site's terms of use and robots rules, and keep within local regulations. Certificate handling is about keeping your connections honest, not about getting around a site's rules.
- Do not trust certificates from unknown intermediaries. If a provider asks you to install its own authority on a personal device for ordinary use, ask why. For plain tunnelling there is rarely a reason.
- Keep software current. Trust bundles, browsers and libraries are updated as authorities change. An old runtime is a frequent source of baffling errors.
A quick checklist
Before you start a session or a new script, run through this list.
| Check | What to confirm |
|---|---|
| Proxy address and port | Correct host, correct port, correct protocol type |
| Certificate issuer | Matches the site's normal public authority, not a device or product name |
| Host name | The certificate lists the host you requested |
| System clock | Date and time are correct, including time zone |
| Trust bundle | Library and operating system are up to date |
| Verification setting | Left on; no global switches turned off |
| Credentials | Stored outside source code and logs |
| Purpose | Lawful, within the site's terms and local rules |
Summary
HTTPS and proxies work well together because a standard proxy only builds a tunnel and cannot read what passes through it. Your client still verifies the destination's certificate, which is why a new certificate error after enabling a proxy is a signal worth reading, not noise to silence. The usual culprits are a different trust store, a wrong clock, an inspection layer you did not know about, or a simple address mistake. Inspect the issuer, compare it with a direct connection, and fix the cause instead of disabling verification. Keep credentials out of code, test for DNS leaks, and use proxies lawfully and within each site's terms.
When you are ready to try this with a real endpoint, the details of what a plan offers are on the proxy page.
Frequently asked questions
Can a proxy read my HTTPS traffic?
In the normal setup, no. The client asks the proxy to open a tunnel to the destination and then negotiates TLS directly with the destination site, so the proxy sees the host name and port but not the page content. The exception is an inspection proxy that you or your organisation have deliberately configured to decrypt traffic.
Why do I get a certificate error only when the proxy is on?
Something between you and the site is presenting a certificate that your client does not trust, or your client is using a different trust store than your browser. Common causes are an inspection proxy with its own certificate authority, a wrong system clock, or a library using an outdated bundle of trusted authorities.
Is it fine to turn off certificate verification to make an error disappear?
No. Disabling verification removes the protection that proves you are talking to the real site, and it hides exactly the problem the warning is trying to show you. Find the cause and fix it instead.
Does an HTTPS proxy mean the same thing as proxying HTTPS sites?
No. Proxying HTTPS sites means tunnelling encrypted traffic through any proxy. An HTTPS proxy means the connection between your client and the proxy is itself encrypted, which protects proxy credentials on the way to the proxy.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a proxy for this?
XPASS Proxy sells residential proxy traffic by the gigabyte, with the price shown before you pay.
See proxy plansKeep reading

Proxy Guides
How to Store Proxy Credentials Securely
Proxy credentials leak through code repositories, shell history, logs and chat messages. Learn practical storage options, rotation habits and what to do after an exposure.
10 min read

Proxy Guides
How to Use a Proxy with Python Requests, Step by Step
A practical walk-through of configuring a proxy in Python Requests, from a single call to a reusable session, plus how to verify it works and debug common errors.
9 min read

Proxy Guides
How to Check for a DNS Leak in a Proxy Setup
A proxy can hide your address from a website while your DNS queries still travel the normal route. Learn how to test for that and fix it.
10 min read