I received an IPv6 address using the following command (and output):

$ dig +short +answer aaaa deb.debian.org

Now, when I try to run the following command:

wget -6 https://2a04:4e42:65::644

I get the following error:

https://2a04:4e42:65::644: Bad port number.

My wget version info:

GNU Wget 1.21 built on linux-gnu.

Is this version of wget (debian 11) not compatible with IPv6?

1 Answer 1


You should "escape" the address, e.g. wget -6 https://[2a04:4e42:65::644]

You may also want to add --no-check-certificate because SSL certificates are issued for domain names, not IP addresses.

Lastly you may still get an error or a default web server page as most websites are set up to serve data only when the Host: field is properly specified.

  • 2
    You can also use the DNS name. wget -6 https://deb.debian.org. This should address both the certificate issue and the bad default page.
    – doneal24
    Nov 1, 2021 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .