Resurrect Dead Websites in Minutes: Claude Code's Wayback Machine Workflow

Resurrect Dead Websites in Minutes: Claude Code's Wayback Machine Workflow

Use Claude Code to scrape, parse, and rebuild archived websites from The Wayback Machine with a single CLI command and structured prompts.

16h ago·4 min read·2 views·via hn_claude_code
Share:

Resurrect Dead Websites in Minutes: Claude Code's Wayback Machine Workflow

The Technique — Structured Wayback Machine Resurrection

When a developer on Hacker News asked how to resurrect a 20-year-old website from The Wayback Machine using Claude Code, they identified a perfect use case for Claude's web scraping and code generation capabilities. The workflow involves three key steps: extracting archived content, analyzing the original structure, and rebuilding a functional modern version.

Why It Works — Claude's Context Window and HTML Parsing

Claude Code excels at this task because of its 200K token context window and sophisticated HTML/CSS understanding. Unlike traditional web scrapers that just download files, Claude can:

  1. Understand legacy markup - Parse tables-for-layout, deprecated tags, and inline styles
  2. Extract semantic structure - Identify navigation, content sections, and functional elements
  3. Modernize intelligently - Convert old patterns to responsive designs while preserving intent

How To Apply It — The Complete Workflow

Step 1: Gather Wayback URLs

First, find your target site on archive.org and get the snapshot URLs. Create a text file:

# Create a manifest of pages to resurrect
cat > wayback_urls.txt << EOF
https://web.archive.org/web/20040101000000/http://oldsite.com/index.html
https://web.archive.org/web/20040101000000/http://oldsite.com/about.html
https://web.archive.org/web/20040101000000/http://oldsite.com/products.html
EOF

Step 2: Launch Claude Code with Clear Instructions

claude code --task "resurrect-website" --context wayback_urls.txt

Then provide this prompt:

I need to resurrect a dead website from these Wayback Machine URLs.

GOAL: Create a functional modern version that preserves the original content and navigation structure.

CONSTRAINTS:
1. Extract ALL text content, images (find src attributes), and navigation links
2. Convert table layouts to CSS Grid/Flexbox
3. Make responsive for mobile/desktop
4. Preserve the original color scheme and visual hierarchy
5. Fix broken links (make internal links relative)
6. Use semantic HTML5 tags where appropriate
7. Create a single-page application OR multi-page site based on the original structure

OUTPUT: A complete project with:
- index.html (main structure)
- styles.css (modern, responsive CSS)
- images/ folder with downloaded assets
- README.md explaining the resurrection process

Start by analyzing the provided URLs and creating a sitemap.

Step 3: Handle Missing Assets

Claude Code can't directly download images from archive.org, but it will create placeholder references. Use this follow-up prompt:

For each image reference you found, create:
1. A commented note with the original archive.org URL
2. A descriptive alt text based on context
3. A fallback div with the image's purpose

Example: <!-- Original: https://web.archive.org/web/2004.../logo.gif -->
<div class="logo-placeholder">[Company Logo]</div>

Step 4: Modernization Pass

Once the basic structure is extracted:

Now optimize the resurrected site:
1. Convert font sizes to rem units
2. Add CSS variables for the color scheme
3. Implement a mobile navigation menu
4. Ensure all interactive elements have hover/focus states
5. Add meta tags for SEO
6. Include a "Resurrected from Wayback Machine" footer note

Pro Tips for Better Results

Use CLAUDE.md for Consistency

Create a CLAUDE.md file in your project:

# Website Resurrection Guidelines

## HTML Standards
- Use semantic tags: header, nav, main, article, footer
- All images must have descriptive alt text
- Forms should be accessible with proper labels

## CSS Approach
- Mobile-first responsive design
- CSS Grid for complex layouts
- Flexbox for components
- CSS custom properties for theming

## Asset Handling
- External images: preserve original URLs in comments
- Broken links: convert to # or remove with note
- Legacy scripts: remove but note functionality

Batch Processing Multiple Snapshots

For sites with many pages, process in batches:

# Process 5 pages at a time to stay within context limits
claude code --task "resurrect-batch-1" --context pages1-5.txt
claude code --task "resurrect-batch-2" --context pages6-10.txt
# Then merge results
claude code --task "merge-resurrections" --context batch1/ batch2/

Handling Frames and Legacy Tech

For sites using frames or ancient tech:

This site uses frames. Extract:
1. Each frame's source content separately
2. The frameset structure
3. Recreate as divs with CSS grid areas
4. Preserve the original navigation between frames

What You'll Get

A fully functional, responsive website that:

  • Contains all original content
  • Works on modern browsers
  • Maintains the original site's "feel"
  • Is maintainable with modern tools
  • Includes documentation of the resurrection process

This workflow turns what could be days of manual work into a 30-minute Claude Code session, perfect for preserving digital history or reviving old projects.

AI Analysis

Claude Code users should approach website resurrection as a structured extraction-and-rebuild process rather than trying to download and host archived files directly. The key insight is that Claude excels at understanding HTML structure and intent, not just copying files. **Immediate action:** Create a standardized prompt template for Wayback Machine projects. Save it as `wayback_resurrection.md` in your prompts directory. Include the constraints about modernizing layouts while preserving content. This ensures consistent results across different archived sites. **Workflow change:** Instead of trying to make archived HTML "work," have Claude generate completely new, modern HTML/CSS that replicates the original. This avoids compatibility issues with old browser-specific code. Use Claude's analysis to understand the original information architecture, then implement it with current best practices. **Token optimization:** Process complex sites in chronological batches—start with the homepage and main navigation, then move to content sections. This keeps context manageable and allows for iterative refinement. Always have Claude document what it found and what decisions it made during the resurrection process.
Original sourcenews.ycombinator.com

Trending Now

More in Products & Launches

Browse more AI articles