Fundamentals
What is a .env file?
The dotenv format, where it comes from, what usually lives inside, and why it must stay private.
7 min read
Free defensive check · Ownership verified · Nothing stored
Check whether sensitive environment configuration files are accidentally exposed on your website.
$ ismyenvpublic check example.com
✓ ownership verified (DNS TXT)
| Path | HTTP status | Result |
|---|---|---|
| GET /.env | 404 | not found |
| GET /.env.local | 403 | access denied |
| GET /.env.production | 200 | app fallback page, no config data |
| GET /.env.prod | 404 | not found |
No exposed .env detected
How it works
Type the domain you want to check. We validate it and make sure it points to a public website.
Add a temporary DNS TXT record or a small file under /.well-known. Checks only run on domains you control.
We request four well-known environment file paths and analyze the responses in memory. Nothing is kept.
Curious about the details? Read how the check and the detection work.
Why does this matter?
Many frameworks read settings from a .env file: database connection details, API credentials, mail server logins, encryption keys and service configuration.
The file is meant to be read by your application on the server. If it ends up inside the directory your web server publishes, or a rule that should block it is missing, anyone who requests /.env can download it. Automated scanners request these paths constantly, so an exposure rarely stays unnoticed for long.
Checking takes a minute. Fixing a leaked database password or cloud key usually takes much longer, which is why it is worth verifying after every server change.
# Application
APP_KEY=••••••••••••
# Database
DB_HOST=••••••••
DB_PASSWORD=••••••••••••
# Third-party services
MAIL_PASSWORD=••••••••
AWS_SECRET_ACCESS_KEY=••••••••••••
STRIPE_SECRET_KEY=••••••••••••Built to be defensive
Fix guides
Fundamentals
The dotenv format, where it comes from, what usually lives inside, and why it must stay private.
7 min read
Fundamentals
Keep secrets out of the web root, block dotfiles, and know what to do after an exposure.
9 min read
Web servers
Location blocks that deny dotfiles, keep /.well-known reachable, and survive config refactors.
8 min read
Web servers
Require all denied for dotfiles in the vhost or .htaccess, and the AllowOverride trap.
7 min read
Frameworks
Point the document root at public/, disable debug mode, cache config and rotate APP_KEY safely.
9 min read
Frameworks
Static file middleware, public env prefixes in bundlers, Docker images and secret managers.
9 min read
Questions
Verify your domain and find out in seconds whether your environment file is reachable.