If you look after a few websites (your own, your company's, a client's), there's a short list of things worth checking every few months. None of them need special tools: a terminal and a browser are enough. Here's the list I use, with the commands.
1. Files that should never be public
This is the one that bites hardest. Deploys leave things behind: .env files, .git folders, database dumps, backups.
for p in .env .git/HEAD backup.zip dump.sql db.sql.gz .DS_Store phpinfo.php; do printf '%-16s ' "$p"; curl -s -o /dev/null -w '%{http_code}\n' "https://example.com/$p" done Anything that answers 200 is a problem. If .git/HEAD is readable, your whole source code (and probably some secrets in its history) can be downloaded. Block these at the web server, keep only the public/ folder in the document root, and if a secret was exposed, rotate it: deleting the file is not enough.
2. HTTPS, certificate and redirects
curl -sI http://example.com | head -n 3 # should be a 301 to https:// echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \ | openssl x509 -noout -dates -issuer Check that HTTP redirects to HTTPS, that the certificate isn't about to expire (auto-renewal fails silently more often than you'd think), and that www and the bare domain both work.
3. Security headers
curl -sI https://example.com | grep -iE 'strict-transport|content-security|x-frame|x-content-type|referrer-policy|permissions-policy' The minimum: Strict-Transport-Security, X-Content-Type-Options: nosniff, X-Frame-Options (or frame-ancestors in CSP), Referrer-Policy. A Content-Security-Policy is the hardest to get right and the most valuable. While you're there, look for headers that give away too much, like X-Powered-By: PHP/7.2.1.
4. Email authentication: SPF, DKIM and DMARC
Even if the domain never sends email, someone can send email pretending to be it.
dig +short TXT example.com | grep spf dig +short TXT _dmarc.example.com dig +short TXT selector1._domainkey.example.com # selector depends on your provider You want an SPF record that ends in -all or ~all, DKIM for every service that sends as you, and a DMARC record, at least p=none with reports while you test, then quarantine or reject. A domain that doesn't send email at all should publish v=spf1 -all and p=reject.
5. Open ports
nmap -Pn --top-ports 100 example.com A web server should usually expose 80 and 443 and nothing else. Database ports (3306, 5432, 1433), Redis (6379) or an admin panel on 8080 open to the whole internet are worth a closer look.
6. DNS hygiene and blacklists
Look for DNS records pointing to things you no longer use: an old CNAME to a deleted Heroku app or S3 bucket can be claimed by someone else (subdomain takeover). And check that the server's IP isn't on email blacklists, especially on shared hosting.
7. Domain expiry
whois example.com | grep -i expir Boring, but expired domains are still one of the most common ways sites go down.
Doing it in one go
I got tired of running these one by one, so I built Tools Ninja: you type a domain and one scan checks SSL, DNS, security headers, WHOIS, open ports, tech stack and speed. There are separate tools for SPF/DKIM/DMARC, blacklists and DNS propagation. It's free and doesn't need an account. The commands above are still worth knowing, because they're what you'll use to confirm a fix.
What's on your own checklist that I missed?
