Here is how to use Wayback Machine Downloader in one line: install Ruby, run gem install wayback_machine_downloader, then run wayback_machine_downloader https://example.com. The tool asks the Wayback Machine for every file it has captured on that domain and saves the newest copy of each into ./websites/example.com/. That basic command works, but on a real site you will usually want a date range, a path filter and a slower pace. This guide walks through installation on Windows, macOS and Linux, the options worth knowing, three practical recipes, and what to check once the files are on your computer.
Wayback Machine Downloader is a free, open-source command-line tool published on GitHub. It is not made by the Internet Archive, and community forks with extra fixes also exist. The commands below follow the original project’s documentation; run wayback_machine_downloader --help to confirm the flags your installed version accepts.
Before you start: check what the archive holds
A downloader can only save what the Wayback Machine captured. Spend two minutes on web.archive.org first:
- Open the domain and look at the calendar. Dense blue dots in a period mean the crawler visited often.
- Click a capture from the period you want and browse a few inner pages. If they show errors or redirects, choose another date.
- Note the date range that looks right. You will use it with
--fromand--to.
If only the homepage was ever captured, no tool can download the rest. Our free archive check can do this review for you.
How to install Wayback Machine Downloader
Windows
- Download Ruby from the official RubyInstaller for Windows site. The “Ruby+Devkit” package is the safe choice.
- Run the installer and keep the option to add Ruby to your PATH ticked.
- Open a new Command Prompt or PowerShell window and check the install with
ruby -v. - Install the tool:
gem install wayback_machine_downloader. - Work in a short folder path without spaces, for example
C:\wayback, to avoid path errors.
macOS
- Open Terminal and run
ruby -v. If Ruby is missing or the system copy gives permission errors, install a current Ruby with Homebrew:brew install ruby, then follow Homebrew’s note about adding it to your PATH. - Install the tool:
gem install wayback_machine_downloader. Avoidsudowith a Homebrew Ruby.
Linux
- Install Ruby from your package manager, for example
sudo apt install ruby-fullon Debian or Ubuntu. - Install the tool with
gem install wayback_machine_downloader. If you get a permission error, either usesudoor install gems into your user directory.
Confirm it works by running wayback_machine_downloader --help. You should see the list of options.
How to use Wayback Machine Downloader: the basic command
wayback_machine_downloader https://example.com
This queries the archive’s index for every URL on the domain, keeps only files that returned HTTP 200, picks the newest capture of each, and saves them under websites/example.com/ in the folder you ran it from. The download runs one file at a time by default, which is slow but gentle on the archive.
The options you will actually use
| Option | What it does | When to use it |
|---|---|---|
-f, --from TIMESTAMP |
Only files captured on or after a date (year, year+month or a full 14-digit timestamp) | Skip early versions of the site |
-t, --to TIMESTAMP |
Only files captured on or before a date | Stop before the domain changed owner or became a parked page |
-o, --only FILTER |
Only URLs matching a string or a /regex/ |
Download just the blog, or just images |
-x, --exclude FILTER |
Skip URLs matching a string or regex | Leave out feeds, tag archives or large media |
-d, --directory PATH |
Save to another folder | Keep separate runs apart |
-e, --exact-url |
Download only the URL given, not the whole site | Rescue a single page |
-s, --all-timestamps |
Download every capture, each in its own timestamp folder | Research how pages changed (can be huge) |
-a, --all |
Also save redirects and error responses | Rarely; mostly for debugging |
-c, --concurrency N |
Download N files at once | Keep low; high values trigger rate limits |
-l, --list |
Print the file list as JSON without downloading | Preview the job before running it |
Three practical recipes
1. Download the site as it looked in a chosen period
wayback_machine_downloader https://example.com --from 2016 --to 2018
This is the most useful recipe. Without a date range the tool takes the newest capture of each file, which can mix an old design with pages from a later owner. The snapshot selection guide explains how to pick the right period.
2. Preview, then download one section
wayback_machine_downloader https://example.com --list > files.json
wayback_machine_downloader https://example.com --only /blog/ --to 2018
The list shows how many files exist and where. Then download only the part you need, which is faster and easier to check. If you would rather not run the tool yourself, our done-for-you Wayback Machine downloader delivers the finished files.
3. Save a single page
wayback_machine_downloader https://example.com/about.html --exact-url --to 2018
Handy when you only need one page’s text or one document.
After the download: what to check
- Open
index.htmlin a browser and click through. Note pages that are blank or show errors. - Look for missing images and CSS. Files hosted on other domains or CDNs are often not in the download. Search the archive for those exact URLs; they may exist under a different date. See recovering missing images.
- Search the files for
web.archive.organd fix leftover archive links so the site works offline and on new hosting. - Remove duplicates created by query strings such as
style.css?ver=4.9, and update references to the copy you keep. - Accept the limits. Forms, search, logins, carts and the database were never in the archive. They need rebuilding, not downloading.
Common problems
- The run stops with 429 or connection errors. The archive is rate-limiting you. Lower
--concurrencyto 1, wait, and run again; existing files are kept. - “command not found”. Ruby’s gem folder is not on your PATH. Open a new terminal or reinstall Ruby with the PATH option.
- Only a few files downloaded. Try the domain with and without
www, and check that the archive really holds more.
For a longer list, read Wayback Machine downloader not working? Common errors and fixes. If the tool keeps stopping with HTTP 429, see how to fix the Wayback Machine 429 Too Many Requests error.
A sensible order of work
Once you know how to use Wayback Machine Downloader, the safest routine is the same on every project. Preview the file list with --list, download one small section with a date range, check it offline, and only then run the full job. Keep each run in its own folder with --directory so you can compare results, and write down the dates and filters you used. If a later run looks worse, you can go back to the earlier copy instead of starting over. On large sites, split the work by section, such as pages, blog and images, so one failed run does not cost you everything.
Prefer not to use the command line?
The tool gives you raw files; the cleanup is up to you. If you need a browsable copy you can upload straight away, our HTML website download service chooses consistent snapshots, fixes links and assets and tests every page, and the archive.org to WordPress option turns the content into an editable site.
For files stored as archive.org items (not Wayback captures), use the official ia tool instead; see our archive.org download guide.
Frequently asked questions
Is Wayback Machine Downloader free?
Yes. It is open source and free to install. The archive itself is also free to read, within fair use.
Does it work on Windows?
Yes, once Ruby is installed with RubyInstaller. The commands are the same in Command Prompt or PowerShell.
Why does my copy mix old and new pages?
By default the tool takes the newest capture of each file. Set --from and --to to keep one period.
Can it download a site that is not in the Wayback Machine?
No. It only reads the archive. If the site was never captured, there is nothing to download.