Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to download the following subdomain with the recursive option using wget:

So if that URL has links to and, these two should also be downloaded.

But I don't want anything outside the subdomain to be downloaded. For example, if has a link back to, the page should not be downloaded.

What wget command should I use?

share|improve this question

migrated from Oct 13 '12 at 8:56

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 4 down vote accepted

Use the --no-parent option in wget:


Do not ever ascend to the parent directory when retrieving recursively. This is a useful option, since it guarantees that only the files below a certain hierarchy will be downloaded.

share|improve this answer
Ah, that's what I'm looking for. The wget options are so numerous that I couldn't find it. :) – Paul Seangwongree Oct 8 '12 at 19:53

Try using the -I option to specify the directory to include in the download:

wget -r -I,
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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