robots.txt is not a lock: Ember's two-minute check
Detective Ember sniffs this one a lot: a private path listed in robots.txt.
That file only asks well-behaved crawlers to skip a path. It is not access control, and the file is public, so a line like Disallow: /admin-backup/ tells everyone where to look. RFC 9309, the standard for robots.txt, says so directly: the protocol is not a substitute for real security, and listing paths in the file makes them discoverable.
What robots.txt actually does
robots.txt is a plain text file at the root of your site. Search engines and other polite crawlers fetch it before they crawl, read the rules for their user agent, and skip the paths you list. That's the whole job.
It helps with things like:
- keeping crawlers out of endless search result pages or filter combinations
- saving your server from bots hammering a slow endpoint
- telling AI crawlers which parts of a public site you'd rather they skip
What it doesn't do:
- It doesn't block anyone. A browser, a script or a scraper that ignores the file can still open every path on it. Following the rules is voluntary.
- It doesn't hide anything. Anyone can open
yourdomain.com/robots.txt. People who go looking for weak spots often read it first, because it's a list of places the owner didn't want found. - It doesn't reliably keep a page out of search. Google's own docs say a blocked URL can still show up in results if other pages link to it, just without a description. To keep a page out of search, Google recommends a
noindextag or password protection, and a crawler has to be allowed to fetch the page to see thenoindex.
A real-looking example
Here's the kind of file Ember finds on vibe-coded apps. This one is made up, but every line is a pattern that shows up in the wild:
User-agent: *Disallow: /adminDisallow: /staging/Disallow: /backup.zipDisallow: /exports/customers.csvDisallow: /api/internal/
Read it the way a stranger would:
/admin: there's an admin page. Is it behind a real login, or does it only check a flag in the browser?/staging/: there's an older copy of the app. Old copies often have old keys and older, looser database rules./backup.zipand/exports/customers.csv: there are files with a name and an address. If they still exist, anyone can download them. No password needed./api/internal/: there are API routes the owner thinks of as private. "Internal" in a URL doesn't make a route private. Only a check on the server does.
None of those lines protect anything. They're a map.
The two-minute check
- Open
yourdomain.com/robots.txtin a browser. - Visit each disallowed path while logged out, in a private window.
- If anything loads, put real authentication in front of it or remove it.
If you like the terminal, curl -I https://yourdomain.com/admin shows the status code. A 401, 403 or 404 is what you want for something private. A 200 means the server sent something back.
One gotcha: many single-page apps (React, Vite, Next.js static exports) answer every path with a 200 and the same app shell, then decide in the browser what to show. So don't stop at the status code. Look at what actually loads, and check the network tab for the data requests that page makes. If those data requests work while you're logged out, the page isn't private, even if the screen says "Access denied".
What to use instead
Pick the tool that matches what you're protecting.
Pages and API routes: check on the server. Every private page and every private API route should check who's asking on the server, before it sends anything. A redirect in the browser or a hidden menu item is not a check. If someone can call the API route directly and get data, so can everyone.
Database rows: Row Level Security. If your app uses Supabase, the anon key in your frontend is public by design. What keeps your data private is Row Level Security, turned on for every table, with policies that say who can read and change each row. A table with RLS off, or with a policy of using (true), is readable by anyone with that public key, no matter what robots.txt says.
Files: private storage. Customer exports, invoices and uploads belong in a private storage bucket, served through short-lived signed URLs to signed-in users. In Supabase that's a private bucket plus createSignedUrl. A public bucket, or a file sitting in your site's public folder, is downloadable by anyone who has the address.
Backups and old copies: delete them. A backup has no business being on the live site. Move it somewhere private, or delete it. Staging copies should sit behind your host's password or deployment protection, or be taken down.
Pages that are public but shouldn't be in search: noindex. A thank-you page or a printable receipt template can carry <meta name="robots" content="noindex">. That keeps it out of results without listing it in robots.txt for everyone to read.
And keep robots.txt for what it's good at. Crawl hints for public pages. If a path is truly private, it doesn't need a robots.txt line at all, because nobody without access should get anything back from it.
Clean up your file
Once the private paths are protected for real, take them out of robots.txt. They don't need to be advertised. What's left should be boring: your sitemap line, maybe a few crawl hints for search and filter pages, and your choices about AI crawlers.
Then scan your own app on SniffPup.
Full fixes free for every critical issue (no critical? one other fix is free).
Want one check like this every morning? Sign up below.
Named after Ember, my black Pomeranian. Built by a software engineer and vibe-coding hobbyist to help you ship safely.