≡ Menu

Use wget Command To Download Files From HTTPS Domains

How do I download a file using https://example.com/dl/foo.tar.gz 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:

wget https://cyberciti.biz/foo/bar.tar.gz

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 https://cyberciti.biz/foo/bar.tar.gz

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 https://cyberciti.biz/foo/bar.tar.gz

Set https proxy using httpd_proxy variable:

export https_proxy="https://USERNAME-HERE:PASSWORD-HERE@Server-Name-Here:PORT-NUMBER-HERE/"
export https_proxy="https://vivek:TopSecretePassword@server1.cyberciti.biz:3128/"
wget https://cyberciti.biz/foo/bar.tar.gz</kbd>

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

export https_proxy="https://server1.cyberciti.biz:3128/"
wget --http-user="USER" --http-password="PASSWORD" https://cyberciti.biz/foo/bar.tar.gz</kbd>
Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 3 comments… add one }
  • Ahmed Dev August 16, 2014, 1:13 am

    Thanks That really helps

  • JZA November 13, 2014, 3:14 am

    I want to know how can I set by default the –no-check-certificate on wget for https. Is this possible?

    • samy December 11, 2014, 8:23 pm

      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.

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , ,