Use wget Command To Download Files From HTTPS Domains

last updated in Categories , ,

How do I download a file using using wget command line utility?

GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. The syntax is:



If you don’t want about checking the validity of the certificate just pass the option --no-check-certificate to the wget command-line:

wget --no-check-certificate

You can pass the --no-proxy option to the wget command. This option tells wget not to use proxies, even if the appropriate `*_proxy’ environment variable is defined:

wget --no-proxy

Set https proxy using httpd_proxy variable:

export https_proxy="https://USERNAME-HERE:PASSWORD-HERE@Server-Name-Here:PORT-NUMBER-HERE/"
export https_proxy=""

Or pass proxy server username and password to the server using wget command as follows:

export https_proxy=""
wget --http-user="USER" --http-password="PASSWORD"</kbd>


Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

5 comment

    1. Not sure if you found the answer in the meantime?
      You need to use: check-certificate = off (or check_certificate = off) in your .wgetrc startup file.

  1. Hi,

    I have used wget to login to the application with save cookies parameter in the first step. I have used .pem files for the SSL handshake.
    I pass userid and password to login to the app.

    In the 2nd step I use the same certificate .pem files , also the same cookies file generated in 1st step. This step actually calls the main function of the application to perform certain operation/job.

    Now the client doesn’t want to give userid and pass in the 1st step, I am not able to find a way how to directly invoke the function of 2nd step to call the application to do the job.

    Can you tell me how wget can be used in windows to call the main function by directly logging in to application.


    Still, have a question? Get help on our forum!