BreachHunter
Pricing Blog Log inSign up
● thermal huntscan engines onlineassessment only — no exploits
  1. Home
  2. Blog
  3. Deleted ≠ Gone: What the Wayback Machine Keeps After You Delete Your Secrets

Research · ← All guides

Deleted ≠ Gone: What the Wayback Machine Keeps After You Delete Your Secrets

Published: October 12, 2026 · Last updated: October 13, 2026 · 9 min read

By the Ingenious AI team

Methodology note: this post documents exactly how BreachHunter's Ghost Files check works and what it looks for. The mechanisms are described precisely; outcomes vary per site. We do not touch archived file contents, only snapshot metadata.

You found a .env sitting in your web root. You deleted it within the hour, rotated the database password, and breathed out. You're safe — right?

Maybe not. If the Internet Archive's Wayback Machine crawled that URL while the file was live, it keeps its own copy. Deleting the file from your server does not delete the archived snapshot. Anyone on the internet can still open it and read every API key, database credential, and signing secret the file ever contained. We call these ghost files: dead on your server, alive in the archive.

The mechanism: why deletion isn't enough

The Wayback Machine is an independent copy. It crawls the public web on its own schedule and stores what it finds. Your server and the archive are two separate systems with two separate delete buttons:

  • Your server: you deleted the file. Gone from the live site.
  • The archive: still holds every snapshot it ever took — with timestamps. Still downloadable by anyone, no authentication.

This is the part most site owners miss. Incident response checklists say "remove the exposed file and rotate the secrets." Rotating the secrets is the step that actually saves you, because the archived copy of the old secrets stays public regardless.

A hypothetical timeline: how a ghost file is born

To make the mechanics vivid, here's a clearly hypothetical scenario: none of this happened to a real customer; it's the composite of how these exposures typically unfold:

Tuesday, 9:14 AM. A contractor debugging a production issue drops a .env into the web root so the app can read its config, planning to remove it after lunch. Tuesday, 11:02 AM. The Wayback Machine's crawler, on its ordinary rounds, fetches /.env, gets HTTP 200, and stores the full file — database URL, mail API key, session secret — with a timestamp. Tuesday, 2:40 PM. The contractor deletes the file. The live site is clean. Eight months later, someone queries the archive for that URL and downloads the whole thing. The file was public for five hours. The snapshot is public forever, until someone asks the Archive to remove it.

The uncomfortable truth in that timeline: the exposure window that mattered wasn't the five hours the file was live. It was the eight months nobody knew a snapshot existed. That's why this check runs on every scan. People can't fix what they can't see, and nobody remembers to check the archive by hand.

What we check: the 8 ghost-file paths

BreachHunter's Ghost Files check runs on every scan, on every tier, because this is the finding people most want to know about. For each of these 8 paths, we query the Wayback Machine's CDX API:

  • /.env — environment files with database credentials and API keys
  • /.git/HEAD and /.git/config — exposed repositories (from which full source, including history, can often be reconstructed)
  • /backup.zip — full-site backups: code, config, database
  • /.aws/credentials — cloud access keys
  • /id_rsa — private SSH keys
  • /wp-config.php.bak and /config.php.bak — config backups with database passwords

How the check works (metadata only — we never touch your secrets)

A deliberate design decision: the scanner queries snapshot metadata only: timestamps and status codes from the CDX API — never the archived file body. Even if the archive holds a live copy of your leaked credentials, our scan never downloads or stores them. You can run the same query yourself; it's a plain HTTP request:

https://web.archive.org/cdx/search/cdx
  ?url=yourdomain.com/.env
  &output=json
  &filter=statuscode:200
  &collapse=digest

That returns one line per archived snapshot (timestamp, original URL, status code, digest) and nothing else. No file contents cross the wire. For each path we record whether any HTTP-200 snapshot exists at all, the first and most recent snapshot dates, and how many snapshots exist.

If snapshots exist, the finding is rated HIGH and the report links straight to the archived copy so you can see exactly what's exposed, plus the fix steps, in order:

  1. Remove the file from your server if it's still there. Stops future snapshots.
  2. Rotate every secret that was ever in it — assume compromise, because the archived copy is public and you don't know who downloaded it.
  3. Ask the Internet Archive to exclude the URL. Email [email protected] with the exact URLs, the time period to exclude, and the period during which you controlled the site — that's the Archive's documented process (their help center lists exactly these three items). It's a review, not a guaranteed takedown, and it takes time; that's why step 2 comes first.
  4. Block the path going forward — in robots.txt and at the server level — so it's never archived again. Note the nuance: robots.txt only affects future crawling. It does not delete snapshots the Archive already holds. Anyone telling you otherwise is selling something.

Rotation is the real fix (and it's bigger than you think)

Step 2 deserves emphasis because it's where most cleanups quietly fail. "Rotate the secrets" doesn't mean changing one database password. It means inventorying everywhere the exposed secret ever lived or was copied:

  • The live server's environment and config files
  • CI/CD pipeline secrets and deploy scripts
  • Staging and development copies of the same config
  • Teammates' machines, if the file was ever shared or cloned
  • Backups (including the one that caused this whole problem)
  • Third-party services, if the leaked key granted access to them (revoke at the provider, don't just stop using it)

Assume compromise isn't paranoia; it's arithmetic. You cannot prove nobody downloaded the snapshot, so you proceed as if somebody did. The archived copy staying public is then harmless. It's a museum exhibit of credentials that no longer work.

What this looks like in practice

A typical ghost-file finding reads like this: "The Wayback Machine holds 4 archived snapshot(s) of /.env that returned HTTP 200 (first 2022-03-14, most recent 2024-11-02). Even if you deleted this file from your server, anyone on the internet can still download the archived copy, including every secret it ever contained."

Note the date range: a file deleted in 2023 can still be downloadable from a 2021 snapshot. The archive doesn't care when you cleaned up — it cares when it crawled. This is also why rotating secrets matters more than deleting files: deletion stops future crawling, rotation neutralizes what's already archived.

Prevention: stop secrets reaching the web root at all

The best ghost file is one that was never archived. Three habits, in increasing order of effort:

  • Keep secrets out of the document root. Environment files live one directory above the web root, or in the platform's secret store — never in a folder the web server can serve.
  • Scan before you commit. Pre-commit hooks with tools like git-secrets or truffleHog catch API keys and private keys before they reach the repository — and a secret that never reaches the repo can't reach the server.
  • Deny dotfiles at the server level. A single Nginx or Apache rule blocking hidden files means the next accidental .env returns 403 instead of 200 — and the Wayback Machine only archives what it can fetch.

Try it on your own site

No scanner looks at the past except this one. Every other check in every other tool tests the live server. Ghost Files is BreachHunter's answer to the question "what did I leave behind?" It ships on the Free plan: scan your site and look for the 👻 findings.

Run the Ghost Files check on your site — free →

Frequently asked questions

Can people still download files I deleted from my website?

Possibly. If the Wayback Machine crawled the file while it was live, it keeps its own copy. Deleting the file from your server doesn't delete the archived copy. Anyone can replay the archived snapshot, including every secret the file ever contained.

How do I check whether my deleted files are archived?

Query the Wayback Machine's CDX API for the exact URL: it returns metadata for every archived snapshot. BreachHunter's Ghost Files check automates this for 8 dangerous paths on every scan, using metadata only, so it never downloads archived secrets.

How do I remove a secret from the Wayback Machine?

First, rotate every secret the file contained — assume compromise. Then email [email protected] with the exact URLs, the time period to exclude, and the period you controlled the site; the Archive reviews exclusion requests for sensitive material. Note this is a review, not a guaranteed takedown, and it doesn't undo the exposure. Rotation is what neutralizes it.

Does blocking the archive in robots.txt delete old snapshots?

No. A robots.txt rule only affects future crawling. It doesn't remove snapshots the Archive already holds. To remove existing snapshots you must request exclusion via [email protected]. And rotate the exposed secrets first: removal is a review process that takes time, while the archived copy stays public until it completes.

Which files should I check in the archive?

Start with /.env, /.git/HEAD and /.git/config, /backup.zip, /.aws/credentials, /id_rsa, /wp-config.php.bak and /config.php.bak: the paths most likely to hold credentials, keys, or database dumps.

Sources

Where this guide's claims come from, in citable form:

  • Internet Archive — Wayback Machine (2026) — the archive whose snapshots this check queries.
  • RFC 9309 (2022) — the Robots Exclusion Protocol — what robots.txt can and cannot do.
Share this: X · Facebook · LinkedIn · WhatsApp

Related guides

  • Website Security Test: What It Checks, What It Misses, and How to Read Yours · 9 min read
  • Website Security Cheat Sheet: Headers, TLS, Cookies and Exposed Files · 7 min read
  • What a Website Security Assessment Actually Tests · 10 min read
  • TLS/SSL Basics: What Your Certificate Says About Your Site · 8 min read
  • Common Website Misconfigurations (and How to Fix Them) · 11 min read
  • Reading Your First Pentest Report: From Score to Action · 9 min read
  • SQL Injection in Plain English: How One Login Box Can Read Your Database · 9 min read
  • What Does a Website Security Scan Check? · 8 min read
  • Exposed .git Directory: What It Leaks and How to Check · 7 min read
  • Security Headers Missing? What Each Header Stops · 7 min read
  • How Much Does a Penetration Test Cost in 2026? · 7 min read
  • Website Security Checklist for Small Teams (60-second self-check) · 6 min read
  • Reading Your Scan Results: Which Findings Fix First? · 7 min read
  • Content-Security-Policy Missing: What CSP Does and How to Add It Safely · 8 min read
  • HSTS Missing: What Strict-Transport-Security Prevents · 7 min read
  • Clickjacking and X-Frame-Options: How Framing Attacks Work · 7 min read
  • Cookie Flags Explained: Secure, HttpOnly and SameSite · 8 min read
  • Exposed .env File: What Leaks, What Attackers Do Next, What You Do First · 8 min read
  • Directory Listing Enabled: What It Shows Attackers and How to Disable It · 7 min read
  • Mixed Content: Why Your HTTPS Page Still Loads Insecure Resources · 7 min read
  • Expired SSL Certificate: What Breaks, Why Renewal Fails, and How to Catch It Early · 7 min read
  • TLS 1.0 and 1.1 Still Enabled: Why Old Protocols Show Up as a Finding · 7 min read
  • Open Ports on a Web Server: Which Ones Should Never Face the Internet · 8 min read
  • No SPF or DMARC Record: How Missing Email Auth Exposes Your Website · 7 min read
  • Subdomain Takeover: How a Dangling DNS Record Lets Attackers Claim Your Name · 7 min read
  • Forgotten Subdomains: The Staging Site You Forgot Is Still Public · 7 min read
  • WordPress Security Scan: The Exposures an Assessment Finds on WordPress Sites · 8 min read
  • Exposed Backup Files: .bak, .old and .zip Files Sitting in Your Web Root · 7 min read
  • phpinfo() in Production: The Diagnostic Page That Maps Your Server for Attackers · 7 min read
  • Server Version Banners: Why Your Headers Point Attackers to the Right Exploit · 7 min read
  • End-of-Life Software: Running a Server Stack Nobody Patches Anymore · 7 min read
  • CORS Misconfiguration: When Cross-Origin Sharing Opens Your Data to Any Site · 7 min read
  • Open Redirect Vulnerability: How Your Own Domain Sends Visitors to a Phishing Page · 7 min read
  • Dangerous HTTP Methods: What TRACE, PUT and DELETE Should Never Answer · 7 min read
  • Host Header Injection: Poisoned Reset Links and Cache Attacks Explained · 7 min read
  • What Is security.txt? The Small File That Lets Researchers Reach You · 6 min read
  • Admin Panel Exposed to the Internet: What an Assessment Flags and Why · 7 min read
  • phpMyAdmin Exposed: Why This Database Door Is a Prime Brute-Force Target · 7 min read
  • Spring Boot Actuator Exposed: Environment Dumps, Heap Leaks and Shutdown Endpoints · 7 min read
  • Debug Console in Production: The Finding That Can Become Code Execution · 7 min read
  • Exposed AWS Credentials File: The /.aws/credentials Finding, Explained · 7 min read
  • Referrer-Policy and Permissions-Policy: The Two Quiet Headers You Are Probably Missing · 6 min read
  • Exposed package.json: Your Dependency List Is a Recon Gift · 6 min read
  • DNS Zone Transfer Open (AXFR): Handing Out Your Entire DNS Map · 6 min read
  • Certificate Name Mismatch: Why the Cert Does Not Match Your Domain · 6 min read
  • Website Security Assessments for Agencies: Checking Every Client Site Without a Security Team · 8 min read
  • SaaS Security Questionnaires: What Buyers Check About Your Website First · 8 min read
  • Ecommerce Website Security: The Exposures That Put Your Checkout at Risk · 8 min read
  • Small Business Website Security: The Checks That Matter at Your Size · 7 min read
  • How to Prepare for a Website Security Assessment (and Read the Report Calmly) · 7 min read
  • Vulnerability Severity Explained: What Critical, High, Medium and Low Actually Mean · 7 min read
  • Retest After Fixes: How to Prove a Security Finding Is Actually Closed · 7 min read
  • Security Assessment vs Vulnerability Scan vs Pentest: What Is the Difference? · 7 min read
  • How Long Does a Website Security Scan Take? · 6 min read
  • Website Security Drift: Why Last Month's Clean Scan Is Already Out of Date · 7 min read
  • WordPress Site Keeps Getting Hacked After Cleanup · 8 min read
  • Google Blacklist Removal: Getting the Red Warning Off Your Site · 8 min read
  • VirusTotal Flagged My Site: How to Clear a False Positive · 8 min read

Related from the Ingenious AI suite

  • DomainGuard — domain impersonation and typosquat defense
  • Vibe-Code Audit — security scanner for AI-generated code
  • See BreachHunter pricing →
BreachHunter · by Ingenious AI · read-only security assessment — scan only targets you own or are authorized to test
About · Contact · Blog · vs Intruder · Privacy · Terms · Security · Threats · Nextcloud Check · Verify Evidence · Help · Redeem
More from Ingenious AI:
DisclosureGuard — AI disclosure compliance · Vibe-Code Audit — AI code security scanner · Rogue-Agent Defense — AI agent firewall · ChatBreaker — AI chatbot red-teaming · ModelMinder — AI model deprecation radar · TermsWatch — AI vendor terms monitor · Agent Flight Recorder — tamper-evident agent audit trails · Agent Auth Gateway — agent credentials & kill switch · DomainGuard — domain impersonation defense · Agent Passport — Know-Your-Agent registry · AgentGate — agent policy publisher · AgentBlock — AI agent & crawler access control · BoundaryVault — agent log forensics · Agentic Receipts — verifiable agent payment receipts · EvalEgress — eval-to-production exposure scan · HomeShield MCP — home AI server exposure check · WireWatch — payment verification ceremony · ADMT Notice Kit — AI decision notice compliance · DueLadder — human-approved invoice chasing · Agent-Ready Store Audit — can AI agents buy from your store · ContentCraft AI — content operations · AgentReady — agent-readiness checks · AI Audit Exchange — AI audit exchange · CallbackShield — callback & webhook protection · CompanionGuard — AI companion safety guardrails · CRAClock — EU Cyber Resilience Act deadline clock · EInvoice Translator — e-invoice format translator · GEOFixer — geo & local listing fixes · MandateGuard — agent spending mandates · OutcomeMeter — AI outcome measurement · ProvenanceGuard — content provenance checks · ReviewDesk — review response desk · ReviewProof — verified review evidence · TakedownCoop — coordinated phishing takedowns · TrustGate — trust & safety gating · BreachHunter — website penetration testing · All 36 platforms — the Ingenious AI portfolio

We use cookies. Necessary cookies keep the site working. With your permission we also use analytics cookies (to understand usage) and marketing cookies (for ads). Read our privacy policy.

NecessaryRequired for login, security and core features. Always on.
AnalyticsHelps us understand which pages are useful.
MarketingUsed for advertising and measuring ad performance.

    No match. Try “pricing”, “php2shell” or “contact” — or press Esc to close.

    ↑↓ navigate · Enter open · Esc close