HTTPS_PROXY
Specifies the proxy server URL for HTTPS requests. Most tools check both HTTP_PROXY and HTTPS_PROXY separately. Can point to either an HTTP or HTTPS proxy server. In many environments, this is set to the same value as HTTP_PROXY.
Last updated:
HTTPS_PROXY routes outbound HTTPS (TLS) traffic through a proxy. Because the overwhelming majority of API calls, package downloads, and git-over-HTTPS traffic is encrypted, HTTPS_PROXY is the variable that actually matters in most corporate-proxy setups — HTTP_PROXY on its own barely covers anything. Confusingly, the value is usually still an `http://` URL even though it proxies HTTPS: the scheme describes how you reach the proxy (an unencrypted hop to a local/corporate proxy that then CONNECTs to the target), not the traffic being proxied.
- Provider
- General / OS
- Category
- network
- Set by
- Set manually or via corporate network configuration
- Example
- http://proxy.example.com:8080
How to set HTTPS_PROXY
bash
export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1,.internalwith proxy credentials
export HTTPS_PROXY=http://user:pass@proxy.example.com:8080References
Frequently Asked Questions
Should HTTPS_PROXY start with http:// or https://?
Almost always http://. The scheme refers to how your machine reaches the proxy, not the traffic being proxied. A standard forward proxy accepts a plain connection and then tunnels your HTTPS via CONNECT, so HTTPS_PROXY=http://proxy:port is correct. Use https:// only if the proxy endpoint itself speaks TLS.
Stay up to date
Get notified about new guides, tools, and cheatsheets.
Related Variables
HTTP_PROXY
Specifies the proxy server URL for HTTP requests. Used by many command-line tools (curl, wget, apt), package managers (npm, pip), and programming language HTTP clients. The format is typically http://[user:password@]host:port.
NO_PROXY
A comma-separated list of hostnames, domain suffixes, or IP addresses that should bypass the proxy. Supports wildcards in some implementations. Used to exclude internal services, localhost, and private network addresses from proxy routing.