How to Solve the cURL (60) Error When Using Proxy?

The cURL (60) error is a common error encountered when using proxies with cURL. The full error traceback looks like the following:

curl: (60) schannel: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it.

This error happens when cURL attempts to request a web page over the HTTPs protocol with a proxy server that doesn't have a valid TLS certificate. Hence, it fails to establish a secure connection.

To solve the cURL (60) error, you can use a proxy that has a valid TLS certificate to support the HTTPs protocol. Alternatively, you can omit establishing the secure connection by adding the -k cURL option:

curl -x https://proxy_domain.com:proxy_port https://httpbin.dev/ip -k

For further details on proxies, including their types and best practices when choosing a proxy, refer to our introduction guide.

Introduction To Proxies in Web Scraping

Discover the different types of proxies, how they compare, and the best practices for web scraping while tackling common proxy challenges.

proxies article banner

Provided by Scrapfly

This knowledgebase is provided by Scrapfly data APIs, check us out! 👇