SSL certificate validation confirms that the server’s identity and encryption are trustworthy. In testing environments with self-signed or expired certificates, cURL normally refuses the connection.
$ curl https://www.example.com/ curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate. curl: (60) SSL: no alternative certificate subject name matches target host name 'www.example.com' More details here: https://curl.haxx.se/docs/sslcerts.html curl: (60) SSL certificate problem: unable to get local issuer certificate 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. To learn more about this situation and how to fix it, please visit the web page mentioned above.
Temporarily bypassing certificate checks with --insecure allows communication despite certificate issues, assisting in evaluating internal services or experimental setups without valid certificates.
This approach removes security safeguards, so it must be used judiciously to avoid exposing sensitive data or compromising security standards.
Steps to skip SSL certificate verification in cURL:
- Open a terminal.
- Attempt accessing a site with an invalid certificate.
$ curl "https://www.example.com/" curl: (60) SSL certificate problem: ...
- Use --insecure to ignore certificate errors.
$ curl --insecure "https://www.example.com/" <html>...</html>
--insecure proceeds despite SSL issues.
- Add insecure to ~/.curlrc for all sessions if needed.
$ echo "insecure" >> ~/.curlrc
Persistent insecure mode is risky. Use only in controlled environments.
- Verify that output is now accessible without SSL errors.
Carefully review responses; security checks are bypassed.

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.