Skip to content

Ignore invalid and self signed SSL check in curl and wget

homepage-banner

When making requests to a server using curl or wget, you may encounter SSL errors if the certificate of the server is not valid or self-signed. This can be frustrating, especially when you know the server is safe and you just want to get your work done. Fortunately, both curl and wget allow you to ignore SSL errors and continue with your request. In this article, we’ll explore how to ignore invalid and self-signed SSL checks in curl and wget.

Ignore SSL check in command line

curl -k ${https_url}
curl --insecure ${https_url}
wget --no-check-certificate ${https_url}
http --verify no ${https_url}

Ignore SSL check for a specific domain

If you only want to ignore SSL errors for a specific domain, you can add the domain to your curl or wget configuration file. For curl, add the following line to your .curlrc file:

insecure

For wget, add the following line to your .wgetrc file:

check_certificate = off

Now when you make a request to the specified domain, SSL errors will be ignored.

Feedback







Small world. Big idea!
  • Welcome to visit the knowledge base of SRE and DevOps!
  • License under CC BY-NC 4.0
  • Made with Material for MkDocs and improve writing by generative AI tools
  • Copyright issue feedback me#imzye.com, replace # with @