Fedora 39 wget not working

wget --debug http://www.example.com/file1.zip
DEBUG output created by Wget 1.21.3 on linux-gnu.

Reading HSTS entries from /home/egonzalezs/.wget-hsts
URI encoding = «UTF-8»
Converted file name 'file1.zip' (UTF-8) -> 'file1.zip' (UTF-8)
--2023-09-22 08:56:09--  http://www.example.com/file1.zip
Resolviendo www.example.com (www.example.com)... 2606:2800:220:1:248:1893:25c8:1946,
Caching www.example.com => 2606:2800:220:1:248:1893:25c8:1946
Conectando con www.example.com (www.example.com)[2606:2800:220:1:248:1893:25c8:1946]:80...

Could you try this?
wget --debug --inet4-only http://www.example.com/file1.zip

I tested here with this command and it worked:

wget https://kojipkgs.fedoraproject.org//packages/htop/3.2.2/3.fc39/x86_64/htop-3.2.2-3.fc39.x86_64.rpm
–2023-09-22 08:42:25-- https://kojipkgs.fedoraproject.org//packages/htop/3.2.2/3.fc39/x86_64/htop-3.2.2-3.fc39.x86_64.rpm
Resolvendo kojipkgs.fedoraproject.org (kojipkgs.fedoraproject.org)…,
Conectando-se a kojipkgs.fedoraproject.org (kojipkgs.fedoraproject.org)||:443… conectado.
A requisição HTTP foi enviada, aguardando resposta… 200 OK
Tamanho: 189959 (186K) [application/x-rpm]
Salvando em: “htop-3.2.2-3.fc39.x86_64.rpm”

htop-3.2.2-3.fc39.x86_64.rpm 100%[================================>] 185,51K 393KB/s em 0,5s

2023-09-22 08:42:26 (393 KB/s) - “htop-3.2.2-3.fc39.x86_64.rpm” salvo [189959/189959]

Version: wget-1.21.3-7.fc39.x86_64

wget https://kojipkgs.fedoraproject.org//packages/htop/3.2.2/3.fc39/x86_64/htop-3.2.2-3.fc39.x86_64.rpm


wget --debug --inet4-only http://www.example.com/file1.zip
Setting --inet4-only (inet4only) to 1
DEBUG output created by Wget 1.21.3 on linux-gnu.

Reading HSTS entries from /home/egonzalezs/.wget-hsts
URI encoding = «UTF-8»
Converted file name 'file1.zip' (UTF-8) -> 'file1.zip' (UTF-8)
--2023-09-22 18:33:04--  http://www.example.com/file1.zip
Resolviendo www.example.com (www.example.com)...
Caching www.example.com =>
Conectando con www.example.com (www.example.com)[]:80... conectado.
Created socket 3.
Releasing 0x0000563ebdd7d980 (new refcount 1).

---request begin---
GET /file1.zip HTTP/1.1
Host: www.example.com
User-Agent: Wget/1.21.3
Accept: */*
Accept-Encoding: identity
Connection: Keep-Alive

---request end---
Petición HTTP enviada, esperando respuesta... 
---response begin---
HTTP/1.1 404 Not Found
Accept-Ranges: bytes
Age: 438935
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Fri, 22 Sep 2023 16:33:04 GMT
Expires: Fri, 29 Sep 2023 16:33:04 GMT
Last-Modified: Sun, 17 Sep 2023 14:37:29 GMT
Server: ECS (laa/7BD6)
Vary: Accept-Encoding
X-Cache: 404-HIT
Content-Length: 1256

---response end---
404 Not Found
Registered socket 3 for persistent reuse.
URI content encoding = «UTF-8»
Skipping 1256 bytes of body: [<!doctype html>
    <title>Example Domain</title>

    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
 Skipping 744 bytes of body: [   div {
        width: 600px;
        margin: 5em auto;
        padding: 2em;
        background-color: #fdfdff;
        border-radius: 0.5em;
        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    @media (max-width: 700px) {
        div {
            margin: 0 auto;
            width: auto;

    <h1>Example Domain</h1>
    <p>This domain is for use in illustraSkipping 232 bytes of body: [tive examples in documents. You may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">More information...</a></p>
] done.
2023-09-22 18:33:04 ERROR 404: Not Found.

Operating System: Fedora Linux 39
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.5.4-300.fc39.x86_64 (64-bit)
Graphics Platform: Wayland

Version: wget-1.21.3-7.fc39.x86_64

Problem solved.
Thank you.

# To try ipv4 addresses first:
prefer-family = IPv4

If that was the exact command used then it is no wonder it failed.
That is an example domain that appears to be set up to allow use as an example of how some commands may be used and is not an actual domain for downloading files. Users should replace that domain url with the actual url to be used.

The 404 error shows the file not found.

The problem wasn’t the 404, but that wget was stuck in

Conectando con www.example.com

because it was trying to connect to an ipv6 address, and, probably, the OP’s network doesn’t support it.


ipv4 ok
ipv6 not

Fedora copr ipv4
Fedora koji ipv4 and ipv6
https://dl.fedoraproject.org/pub/fedora/linux/ ipv4 and ipv6

I was having problems downloading files with various scripts.