I have a website - http://myradio1.localhost and the directory is currently empty.

The virtual host works fine, no issues there.

This is my command I'm using to download the site via wget:

wget --user-agent="Googlebot/2.1 (+http://www.googlebot.com/bot.html)" -r --convert-links -p -P "C:\www\public_html\myradio1" "http://www.compassfm.co.uk"

It downloads the site perfectly, except for one thing, it always renders it like this when downloaded:


which is not what I want to happen. I want it just to download to the folder, so it can run as http://myradio1.localhost, without me having to move the files out of the domain folder after download has completed.

How can I get wget to download all files, but without creating the domain as a folder, basically?

All help is much appreciated.

1 Answer 1


You need the parameter --no-host-directories or -nH, e.g.

wget --user-agent="Googlebot/2.1 (+http://www.googlebot.com/bot.html)" --no-host-directories -r --convert-links -p -P "C:\www\public_html\myradio1" "http://www.compassfm.co.uk"

From the manual:

Disable generation of host-prefixed directories. By default, invoking Wget with -r http://fly.srk.fer.hr/ will create a structure of directories beginning with fly.srk.fer.hr/. This option disables such behavior.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.