Cookie Consent by Free Privacy Policy Generator

Automating Internet Archive Crawling for Redirects

Go to the Best Of the SEO Community.

Mary Albright
Mary Albright
Oct 22, 2024, 7:17 PM
did someone recently post about crawling internet archive and auto generating redirects?
Forwarded thread from another channel:
Kyle Faber
Kyle Faber
Oct 22, 2024, 7:25 PM
Do you mean getting all old URLs? Or automating the redirect mapping between those old URLs and new ones?
Mary Albright
Mary Albright
Oct 22, 2024, 7:25 PM
both? lol
Kyle Faber
Kyle Faber
Oct 22, 2024, 7:28 PM
Here’s a post I did on the former
Kyle F. on LinkedIn: How do you get a full list of historical URLs for a domain, without past crawl data?
 
Archive [dot] org is a great resource for viewing historical copies of URLs on a domain. And hey, they even have an API!


<narrators voice>

But what if I told you there's a better way...

</narrators voice>


A lesser known way to get ALL the URLs that Archive [dot] org knows about a domain, along with the:

- url key
- timestamp
- original URL
- mimetype
- status code

and other data points, is to use their TXT output URL.

Wait, what is their TXT output URL?

Well, friends, let me tell you.

In an overly simplified way of saying it, it's a URL that—when you enter a domain as the value of its URL parameter—will output their entire list of known URLs over time, in text format

???? ???? ????

Here's what it looks like:

https://web.archive [dot] org/cdx/search/csx?url=[domain]*&output=txt

And here is a basic javascript that you can save as a bookmark, which will allow you to get the list for any domain you're visiting, opened in a new window, with a simple click of a button ❤️

-----

javascript​:(function(){
var domain = window.location.hostname;
var newURL = "https://web.archive [dot] org/cdx/search/csx?url=" + domain + "*&output=txt";
window.open(newURL, '_blank');
})();

(replace [dot] with a period to make this work!)
 
Kyle Faber
Kyle Faber
Oct 22, 2024, 7:28 PM
I’ll dig up some resources tomorrow for you on the latter (unless others can beat me to it first ???? )
Mary Albright
Mary Albright
Oct 22, 2024, 7:29 PM
ah yesss!!! it was youuuuu
Mary Albright
Mary Albright
Oct 22, 2024, 7:29 PM
tyty