Repository Description: JavaScript redirector that reads a JSON list of URLs and redirects visitors to a random archived copy (Wayback Machine, GhostArchive, Megalodon, Archive.today). Lightweight, configurable and SEO-optimized for link preservation workflows.
A minimal client-side tool that loads a JSON file containing URLs and redirects users to a randomly selected web archive such as web.archive.org, archive.today, ghostarchive.org or megalodon.jp. Designed for link preservation, random archive routing, and distributed archive access.
Keywords: web archive, archive redirector, Wayback Machine redirect, archive.today redirect, ghostarchive, megalodon, JavaScript redirect tool, link preservation, SEO, random archive.
archive-redirector-js is a lightweight redirect utility that:
- Fetches a
links.jsonfile on page load - Selects a random URL from the list
- Chooses a random archive provider
- Redirects the visitor to the archived version
Ideal for:
- Distributing traffic across multiple archive mirrors
- Generating random archive destinations for links
- Preserving content using multiple archive sources
- SEO and link-rot protection
- Automatic fetch of JSON link lists
- Random archive provider selection
- Safe URL encoding for all redirects
- Optional interstitial display
- Can be embedded in any static website
- SEO-optimized documentation
The tool supports simple and extended JSON formats.
Simple list:
[
"https://example.com/article-1",
"https://example.com/article-2"
]Extended format:
[
{ "url": "https://example.com/page", "title": "Example Page" }
]- links.json path — specify the JSON file containing URL entries
- archive providers — customize provider templates such as:
- web.archive.org
- ghostarchive.org
- megalodon.jp
- archive.today
- interstitial delay — optionally show a message before redirect
- analytics hook — optional event trigger before redirect
To maximize discoverability:
- Keep the repository name readable and keyword-relevant
- Add GitHub topics:
web-archivewayback-machinearchive-todayghostarchivemegalodonredirectseo
- Use clear headings and descriptive text
- Include JSON examples and configuration notes
- Add a demo GIF or screenshot (recommended)
- Use standard search terms like:
- "redirect to Wayback Machine"
- "archive.today redirect"
- "web archive randomizer"
JavaScript redirector that reads a JSON URL list and redirects users to a random archived copy (Wayback, GhostArchive, Megalodon, Archive.today).
- Ensure you have permission to reference and archive URLs
- Avoid violating archive provider rate-limits or terms
- Provide transparency to users about redirection to archived snapshots
Contributions are welcome. Potential additions:
- More archive providers
- Timestamp-specific archive templates
- Configurable UI interstitials
- Optional server-side version
Submit PRs with clear descriptions.
MIT License recommended — add a LICENSE file.
- Check that
links.jsonis accessible and served with the correct MIME type - Ensure the hosting server allows fetching JSON (CORS if remote)
- Verify URLs in the JSON file are valid and correctly formatted
Q: Does this script create heavy load on archive providers?
A: It sends only one redirect request per visitor, but high-traffic deployments should consider caching.
Q: Can specific timestamps be used?
A: Yes — customize templates using provider-specific timestamp syntax.
Add your project website, demo page, or deployment example once available.