Recursive wget downloads respect crawler policies. For a permitted recursive download, the robots=off setting disables both /robots.txt and document-level nofollow checks.

GNU wget uses the robots setting for this behavior. The command-line form --execute robots=off applies only to the current command, while robots = off in ~/.wgetrc makes the override persistent for that account. The default is robots = on.

Disabling crawler checks can fetch paths that a site excludes from automated downloads, so explicit permission must cover those paths. Keep the approved start URL, recursion depth, parent-directory boundary, and output directory explicit. A one-command override avoids leaving later recursive jobs with crawl checks disabled.

Steps to ignore robots.txt with wget:

  1. Read the /robots.txt file at the root of your approved site in a browser.
    User-agent: *
    Disallow: /exports/internal/

    The example host and paths stand for your approved site and directory. This policy excludes the internal path from recursive retrieval.

  2. Run the recursive download with --execute robots=off.
    $ wget --quiet --recursive --level=1 --no-parent --directory-prefix=approved-capture --execute robots=off https://archive.example.net/exports/

    The --level=1 limit follows links one level from the starting page, --no-parent keeps retrieval below its directory, and --quiet suppresses progress output. The short -e robots=off form is the same override.

    For repeated approved jobs, the equivalent persistent directive in ~/.wgetrc is:

    ~/.wgetrc
    robots = off

    This affects every later recursive wget run for that user until the line is removed. Related: How to configure default options in ~/.wgetrc

  3. List the excluded directory to confirm that its file was downloaded.
    $ ls approved-capture/archive.example.net/exports/internal
    report.html
Share this guide