curl: Could Not Resolve Proxy vs Could Not Resolve Host
Find out whether curl failed to locate the proxy endpoint or resolve the destination before changing DNS or proxy settings.
Read which name curl could not resolve. Errors 5 and 6 concern different parts of a proxied request:
| Message | Meaning and next check |
|---|---|
| Could not resolve proxy — error 5 | Inspect the selected proxy URL's host for misspelling, pasted spaces or misplaced credentials and port text. |
| Could not resolve host — error 6 | Inspect the destination hostname and whether the chosen route resolves it locally. |
A numeric proxy address does not need an ordinary hostname lookup. If the proxy list gave an IP but the error names another host, inspect inherited proxy variables and the actual selected endpoint. In a hostname-only input, use the address alone rather than the full IP:port string.
For destination resolution, curl's socks5 mode performs the lookup on the client; socks5h sends the name to the proxy. Comparing them can reveal a DNS-view difference, but cannot fix a misspelled name. If delegated resolution fails at the proxy, curl may receive a proxy-protocol failure rather than local error 6.
Confirm the proxy URL first, the destination URL second and the resolver location third; then retry without changing unrelated settings. Successful DNS only supplies an address. The connection to that address, proxy handshake and destination request still have to succeed.