The Internet Archive’s Wayback Machine is one of my favorite tools. I have posted a number of links on The New Leaf Journal to archived articles, both for preservation purposes and in some cases because the originals are no longer live. I have also written about some more unconventional uses of the Wayback Machine, notably to circumvent Cloudflare CAPTCHA (CAPTCHAs are terrible). There are many shortcuts for saving articles into the Wayback Machine, including bookmarklets and command line tools. But regular readers will know that I make liberal use of search engine shortcuts in my web browsers. While my main use for custom search engine shortcuts is to quickly run searches in different engines, I have demonstrated some more creative things you can do with them, notably creating shortcuts to minute timers in Google and also in Brave Search and DuckDuckGo or to tools like Wallabag or Norton Safe Web. Here, I will bring together my fondness for the Wayback Machine and custom search engine shortcuts and demonstrate how to add a custom search shortcut for Wayback Machine archiving to your web browser.
General: Refresher on custom search engine browser shortcuts
Nearly all web browsers come with at least one per-configured search engine.
Moreover, most browsers allow users to add their own search engines as well as to remove search engines. This is very easy to do in Chromium-based browsers (e.g., Google Chrome, Microsoft Edge, Brave, Vivaldi, and Opera) and Firefox (albeit Firefox is a bit less intuitive in this area). Chromium and Firefox-based browsers also allow users to assign shortcuts to search engines. For example, let us say that I added Peekier to my list of custom search engines. I could assign Peekier a shortcut of “p” in my settings. After doing that, if I type “p” followed by a space in the address bar, my search will be directed to Peekier instead of my default search engine (note: this only works if you allow for searching from the address bar). Some search tools such as DuckDuckGo and Qwant allow people to direct searches from elsewhere in their own search boxes, but I personally prefer configuring shortcuts at the browser level (see my review of DuckDuckGo Lite and Qwant Lite).
In order to add a search engine to your browser, you need its GET URL. This is the URL that you see when you run a search (i.e., the URL for the search results page), but with %s in place of your query. For example, when I search for the word test in Google, the results page has a URL of https://www.google.com/search?q=test. For Google’s GET URL, I simply replace test with %s; thus: https://www.google.com/search?q=%s. A website called Search Engine Party has the GET URLs for many search engines as well as additional information about their privacy and security.
For purpose of our Internet Archive project, it is important to note that pretty much any site with built in search can be added to a browser in this way. For example, our humble New Leaf Journal is not a search engine, but its search function can be added to your browser with https://thenewleafjournal.com/?s=%s. In an earlier post, I demonstrated how to add searches for your Wallabag bookmarks if you happen to use Wallabag. Many browsers come with Wikipedia or Amazon as a default search option, and I find site-specific search shortcuts particularly useful for the Arch Wiki in my daily computer usage.
How to create a custom browser search engine for adding to the Wayback Machine
Our goal here is to create add a “search engine” to our browser which will send a specified URL to the Wayback Machine. How this should work is as follows:
- I create an address bar search shortcut for saving in the Wayback Machine, I will use :ias, in my example, but it can be whatever the user wants.
- If I type my shortcut into the address bar followed by a space and a full URL, the full URL should be saved in the Wayback Machine.
- Alternatively, if I have a URL open in my browser, I should be able to add my shortcut before the https or http followed by a space and thereby be able to save the full URL into the Wayback Machine.
In short, although we are adding a search engine to our browser, the end functionality is similar to that of a bookmarklet. Having introduced the idea, let us work through it step-by-step.
(Note: I will be using a clean, fresh Brave profile with its annoyances disabled for my example. Firefox is my primary browser, but I have Brave installed for a few things that do not like Firefox and also because I prefer Brave’s profile system. For this example, I am using Brave because most people, including most readers, use Chromium-based web browsers like Brave, and adding search engines to Chromium-based browsers tends to be a little bit easier than it is in Firefox. However, I will provide a Firefox set-up tip in an addendum to step two of my guide.)
1. Obtain Wayback Archiving URL
First, we need to see our URL string when we save something in the Wayback Machine. Without knowing the full URL and where our query (here being the URL we want to save) appears in said URL, we will not know what we need to replace with %s to create our special search engine.
My New Leaf Journal colleague, Victor V. Gurbo, has a professional music website at https://www.victorvgurbo.com. We will save his home page in the Wayback Machine to see the full URL string.
Now we hit “Save Page” and see what the URL is on the next page.
We have the following URL: https://web.archive.org/save/https://www.victorvgurbo.com. Because our proverbial “search term” in this case was Victor’s URL, we must replace that URL with %s while keeping the rest.
2. Add shortcut to your web browser
Now we return to the search engine page in our browser’s settings. As I noted before, I am using Brave for this example. The settings menu will vary from browser to browser, but from my experience most Chromium-based browsers behave similarly with respect to adding and removing user search engines. Thus, this guide should serve you well if you are using another Chromium-based browser such as Google Chrome, Microsoft Edge, Vivaldi, or plain old Chromium.
First, we are going to hit the “Add” button under our list of search engines and add our web archive URL: https://web.archive/org/save/%s. Note again that all we did was take the URL from when we saved Victor’s homepage and replace his URL with %s.
There are two important notes here about adding a search engine. Firstly, you can name the search engine whatever you want. I chose to name it Wayback Machine Archiver, which I think is fairly descriptive. Secondly, you can make the key shortcut whatever you want it to be, so long as it does not conflict with another search engine shortcut. I chose :ias because I picked up the habit of appending a colon to shortcuts from my time using Brave as a primary browser (Brave’s default shortcuts use colons). However, this is not at all necessary. Your shortcut can be a single key. In most browsers I have seen, Google’s and Bing’s default shortcuts are g and b respectively.
Now that we have our Wayback Archiver shortcut set up, it is time to test it in the wild.
2a. A Firefox note
(Feel free to skip to point 3 if you do not use Firefox or one of its derivatives.)
I used Brave instead of Firefox for the example because most people use Chromium-based browsers and it is easier to add shortcuts in them than it is in Firefox. However, Firefox is my primary browser, so I would be loath to not provide a tip for it. Firefox allows for adding custom search engines and assigning shortcuts in the same way as do the Chromium-based browsers. However, while renaming search engines and assigning shortcuts is about the same in Firefox as it is in its Chromium cousins, adding search engines is less intuitive. If you enable Firefox’s search box (distinct from the address bar), it will sometimes recognize when a site has a search and allow you to add it. However, I do not think that most people use the search box and in any event, it would not work for adding our special Wayback Machine shortcut.
While you can edit files in your profile directory, most people (including yours truly) would prefer to use an extension. I can personally recommend two very good free and open source extensions for adding search engines and site-specific searches to Firefox:
I have used both and had no issues with either. I personally prefer Search Engines Helper because it has good import and export functionality, but for the purpose of adding something like our Wayback Machine shortcut, both will work without any issue. You can see below what adding the shortcut looks like with Search Engines Helper:
The process for setting a shortcut for the Wayback Machine Archiver is the same in Firefox as in Brave once the search is added.
If you use a different browser such as Safari, a Chromium or Firefox-based browser with a less intuitive settings menu, or something else entirely, I recommend looking up your browser’s instructions to see if you can add your own search engines or tools with shortcuts.
3. Testing our shortcut
Now that our shortcut is added, let us test it. We will need to type our full shortcut followed by a space in the address bar. I will use a page from my side project on Bear Blog for the example:
This will take about 15-20 seconds…
We have been taken to an archived version of the Bear Blog article. The shortcut works. I do have a few notes on its functionality.
If the target page has not been previously archived, Wayback Machine will try to archive it upon being fed the URL. It is worth noting that not every site is amenable to archiving. This first-time archiving worked without issue for my Bear Blog post.
However, if the page has been previously archived, my shortcut will take you to the most recently-saved version of the page. For example, when I tested it on our own home page, it took me to a capture of The New Leaf Journal from January 2, which was the last time it had archived our home page. Were you to want to take a newer capture, you would have to do so through the Internet Archive’s UI.
Finally, the most useful way to use the shortcut would be when you have the target page already open. For example, say that I had an article open and I wanted to either archive it in the first instance or visit the most recently archived version. Without disturbing the form of the web address in the address bar, I could insert my shortcut right in front of it with a space and hit enter. This would send the URL to the Wayback Machine for processing. Note that you can do the same thing without a shortcut or bookmarklet by adding https://web.archive/org/save/ (no space if you are typing the full save URL) in front of the target URL.
Assessing our solution
This little demonstration, like my two posts on search engine timer shortcuts, shows that you can use browser custom search engines in creative ways. But is it the best solution for easy Wayback Machine archiving?
There are several extensions for Wayback Machine archiving – my favorite is Mr. Armin Sebastian’s free and open source Web Archives, which is available for Chromium and Firefox-based browsers as well as for Safari. This extension also allows for archiving and look-ups in several other archiving and caching services.
The more direct alternative to my shortcut is a bookmarklet. You can save a bookmarklet on your bookmarks bar (or somewhere else where it is easy to click) and click it when you want to archive the page that you are currently on. I am not an expert on making bookmarks, but I tested this one by Mr. Simon Morgan and found that it works well. A bookmarklet, like an extension, is a lower-friction solution than my shortcut for archiving the current web page (one click instead of entering your shortcut with a space before the URL currently in the address bar). My shortcut has one advantage though – you can use it without navigating to the un-archived web page. For example, say that I know that I want to go to the archived version of a particular page due to a likely CAPTCHA issue. I can copy the URL and then paste it after my shortcut to instantly go to the archived page without worrying about the original.
(There are many other Wayback Machine solutions, including command line tools, bookmarking solutions which automatically submit links, etc.)
If you have a heavy use-case for the Wayback Machine and Internet Archive generally, I suppose there is no harm in adding a search shortcut for it to your toolbox.