Skip to content

--domains (-D) doesn't restrict domains for --span-hosts (-H) unlike wget

In old wget the combination of --page-requisites, --domains and --span-hosts limits the downloads to the listed domains. wget2 does not seem to obey this restriction.

For example, I want to mirror the site example.com, and I also want to download pictures it keeps at wp.com. For old wget the following command worked:

wget -m -p -E -K -k -H https://example.com -D example.com,wp.com

but wget2 starts downloading all other sites example.com links to. Eventually it reaches ~120000 pending links and crashes.