Crypto
21 Jul 2026
Read 14 min
How to fix HTTP 407 proxy error and restore access *
fix HTTP 407 proxy error to regain secure browsing and restore uninterrupted page downloads quickly.
What a 407 means and why you see it
A 407 is “Proxy Authentication Required.” It is not the same as a 401 (server auth) or a 403 (forbidden). With 407, the proxy replies with a Proxy-Authenticate header that tells you which login method it expects, like Basic, NTLM, or Negotiate (Kerberos). Your client must answer with Proxy-Authorization. You may see this in:- Web browsers and desktop apps
- Package and build tools (npm, pip, Maven, Gradle)
- Git, curl, Docker, and CLI tools
- Mobile or desktop apps that fetch updates
- Servers that call external APIs through an outbound proxy
How to fix HTTP 407 proxy error: quick checks
Start with fast, low-risk steps. These simple moves often clear the block.- Confirm the site works off the network. Use a phone hotspot to see if the site loads without your proxy. If it loads, the proxy is the gatekeeper.
- Re-enter proxy credentials. Make sure your username includes the domain if needed (for example, CORPjsmith or jsmith@corp.local). Watch for password changes.
- Toggle the proxy off to test. On Windows or macOS, turn off “Use a proxy server” and try again. If it works direct, the proxy setup is the issue.
- Clear saved credentials. On Windows, open Credential Manager and remove proxy entries. On macOS, remove proxy items from Keychain. Restart the app and sign in again.
- Sync your clock. Align system time with internet time (NTP). Kerberos and some SSO flows fail if time drifts more than a few minutes.
- Check environment variables. Look for http_proxy, https_proxy, and no_proxy in your shell or service config. Remove typos and match the right protocol and port.
- Try the right port. Many networks use 8080 for HTTP proxy and 3128 or 443 for HTTPS tunneling. Use what your IT team provides.
- Log in to the captive portal. On guest Wi‑Fi, open a non-HTTPS page like http://neverssl.com to trigger the sign-in page.
- Restart the app or proxy helper. Some apps cache a bad token until a restart.
Fix by platform or tool
Windows
- Open Internet Options > Connections > LAN settings. Uncheck or set the proxy as your company requires. If you use a PAC URL, confirm it loads in a browser.
- Reset WinHTTP proxy if system services fail: run an elevated shell and type “netsh winhttp reset proxy” or set the correct proxy with “netsh winhttp set proxy http=myproxy:8080”.
- Clear cached credentials in Credential Manager and sign in again.
- If your proxy uses NTLM or Kerberos, sign in with the right domain account and ensure the PC is on the domain network or VPN.
macOS
- System Settings > Network > Your interface > Details > Proxies. Match HTTP and HTTPS proxy host and port. If using Auto Proxy Discovery or a PAC URL, test the URL in a browser.
- Remove old proxy passwords from Keychain Access. Then retry to trigger a fresh prompt.
- If your company does SSL inspection, install the corporate root certificate so HTTPS through the proxy succeeds.
Linux
- Check and export environment variables: http_proxy, https_proxy, and no_proxy. Use the full URL, like http://user:pass@proxy.example.com:8080.
- Set system-wide values in /etc/environment or service unit files for daemons.
- For NTLM proxies, use a helper such as cntlm, then point tools to localhost with the mapped port.
- Test with “curl -v -x http://proxy:8080 https://example.com” and read the Proxy-Authenticate header.
Browsers
- Chrome and Edge use system proxy. Fix the OS proxy and relaunch the browser.
- Firefox can override system proxy: Settings > General > Network Settings. Try “No proxy” to test direct access, or “Use system proxy” for corporate setups.
- Clear site data and saved logins for the proxy realm if prompts loop.
CLI and developer tools
- curl: use “curl -v -x http://user:pass@proxy:8080 https://example.com”. Look for 407 or the accepted schemes.
- git: “git config –global http.proxy http://user:pass@proxy:8080” and set https.proxy as well. Remove the setting to test direct: “git config –global –unset http.proxy”.
- npm/Yarn: “npm config set proxy http://proxy:8080” and “npm config set https-proxy http://proxy:8080”. Clear them to test: “npm config delete proxy”.
- pip: set environment variables or add a proxy to pip.conf. For private indexes, add hosts to no_proxy if they are inside the LAN.
- Docker: configure “proxies” in /etc/systemd/system/docker.service.d/http-proxy.conf or daemon.json, then restart Docker. Containers may also need env vars.
- Maven/Gradle: set proxy in settings.xml (Maven) or gradle.properties. Escape special characters in passwords.
Authentication details that matter
NTLM and Kerberos
These often give “works in browser, fails in tool.” The browser can use single sign-on. CLI tools may not. Use a helper (like cntlm) or switch to a tool that supports Negotiate. Make sure the device is on the domain, the clock is correct, and the SPN is valid.Basic and Digest
If the proxy offers Basic, include username and password. If your password has special characters like @ or :, URL-encode them or use a config file instead of inline URLs to avoid parsing issues.PAC files and WPAD
A PAC file is a JavaScript file that decides which proxy to use for each site. If the PAC logic is wrong, your request may hit the wrong proxy or loop. Open the PAC URL in a browser to confirm it loads. Ask IT to validate rules for the site you need. If you can, switch from Auto to a direct proxy host:port to test.SSL inspection and certificates
Some proxies decrypt and re-encrypt HTTPS. If you do not trust the corporate root certificate, your client may fail during CONNECT or on the first TLS handshake after the tunnel. Install the corporate CA in your OS or app trust store. Developers should import it into Java cacerts or Node certificate stores as needed.Bypass rules (no_proxy)
Add internal hosts and domains that should not use the proxy. Use no_proxy with a comma-separated list, like “localhost,127.0.0.1,.corp.local”. In OS settings, add the same entries to “Bypass proxy for” fields. This reduces 407 prompts for intranet sites.Diagnose with the right signals
- Read the Proxy-Authenticate header. It tells you the scheme (Basic, NTLM, Negotiate) the proxy expects.
- Trace with curl -v. You will see each 407 and whether your client sends Proxy-Authorization back.
- Try another network. If it works on a hotspot, the proxy is the variable.
- Ask IT for proxy logs. Provide your username, timestamp, client IP, and the URL you tried.
- Check for loops. A PAC file that points to a dead proxy can cause repeated 407s.
- Watch for double proxies. VPNs, local privacy tools, or antivirus can add a layer. Disable them to test.
When the app shows 500 but the network returns 407
Some apps hide proxy errors and report a generic failure, like “errorCode: 500 Could not download page (407).” In these cases, the upstream proxy still needs credentials. Fix the outbound proxy config for the app or service account:- Set http_proxy/https_proxy and no_proxy in the service environment.
- Store proxy credentials in the app’s secure config, not in code.
- Use libraries that support the required auth scheme (NTLM/Kerberos if needed).
- If a gateway or CDN is between your app and the internet, confirm it can reach the proxy and has the right bypasses.
- Document proxy host, port, auth scheme, and the PAC URL.
- Standardize no_proxy lists for internal domains.
- Rotate passwords cleanly and update stored credentials.
- Enable SSO where possible to reduce manual prompts.
For more news: Click Here
FAQ
* The information provided on this website is based solely on my personal experience, research and technical knowledge. This content should not be construed as investment advice or a recommendation. Any investment decision must be made on the basis of your own independent judgement.
Contents