All lessons / Module 14

Module 14 of 23

Website security checks

Small business sites rarely get hacked by geniuses. They get hurt by simple mistakes: a key left in a file, a form that fills up with spam, a photo that shows a customer's address. This module is a defensive checklist for sites you built or have the owner's permission to check, and it doubles as a service you can offer.

By the end: You can check any site you own or are authorized to check, fix the common problems, and hand the owner a plain-English security report.
Lesson 14.1 · 8 min

What to check before any site goes live

Every site gets the same short check before anyone sees it: HTTPS, no leaked keys, safe forms, no private info, and the right search setting. The launch-safety-check skill runs this for you; here's how to do it by hand with Claude Code so you know what it checks.

  1. Only check what you're allowed to

    Run these checks on sites you built, or sites where the owner has said yes in writing. Never point checks at someone else's site to find problems to pitch them.

  2. Check the site folder first

    Open Claude Code in the site's folder and paste the prompt below. It reads the files only and reports keys, private info, broken links and missing labels. It doesn't change anything until you say so.

  3. Check HTTPS

    Open the live link on your phone and look for the padlock. Then type the address with http:// instead of https:// and make sure it jumps to the secure version by itself.

  4. Check the search setting

    Demos should have a noindex tag; real launched sites should not. Ask Claude to look for "noindex" in index.html and tell you which one this site has.

  5. Check the security headers

    Ask Claude: "Run curl -I on [live link] and tell me which security headers are missing, in plain words." It only reads the response, it doesn't attack anything. For a second opinion, paste the link into Mozilla's HTTP Observatory (search for it, it's free). On Cloudflare, missing headers are usually fixed by asking Claude to add them to the _headers file in your publish folder, then uploading the folder again.

  6. Check your own accounts

    Turn on two-factor login for your hosting, GitHub, domain registrar and email. That's where most real break-ins start, not the website code.

  7. Fix, then check again

    Ask Claude to fix what it found, one item at a time, and explain each change. Then run the same check again until it comes back clean.

Copy-paste prompt
I built this site and I'm about to put it live. Do a defensive pre-launch check of this folder. Read only, change nothing yet.
Check for:
1. Any API keys, secret keys, tokens or passwords in any file (show only the first 6 characters if you find one).
2. Private info: personal emails or phone numbers that aren't the business line, home addresses, customer names or faces in photos, and location data (GPS) hidden in photo files.
3. The form: where it sends, whether it has spam protection, and whether it says what happens on a demo.
4. noindex: is it there, and should it be for a [demo / launched site]?
5. Files that shouldn't be published (.env, notes, drafts, backups, .git).
6. Broken links and anything that doesn't work on a phone.
Give me a short list ranked from most to least serious, with the exact fix for each.
You're done whenClaude's check of the folder comes back clean, the site redirects to HTTPS, and two-factor login is on for your main accounts.
Watch outOnly checking the code and forgetting the photos. Phone photos can carry GPS location data, and job photos can show house numbers or license plates. Have Claude strip photo metadata and look at every photo before launch.
Lesson 14.2 · 8 min

Forms, keys and private info

These are the three places beginners leak things. This lesson shows what a safe form looks like, what to do if a key ends up somewhere public, and how to keep customers' private details off the page.

  1. Know which keys are secret

    Some keys are made to be public, like a Stripe publishable key (starts with pk_) or a maps key locked to one domain. Secret keys (like a Stripe secret key, starting with sk_) must never be in a web page or a public repo.

  2. Keep secrets out of files

    If a site needs a secret, it goes in the host's environment variable settings, not in the code, and never in chat. Ask Claude to set up a .gitignore that blocks .env files before your first commit.

  3. If a key leaks, replace it first

    Go to that service's dashboard, revoke or rotate the key, and make a new one. Deleting it from the file isn't enough, because old versions in GitHub history and copies people already saw still have it.

  4. Make the form safe

    A good form has spam protection (a hidden honeypot field or a checkbox-style challenge such as Cloudflare Turnstile), checks the fields on the server side, and sends to the business without printing the owner's email address in the page code.

  5. Ask only for what the business needs

    A quote form needs a name, a phone or email, and what they need done. Don't ask for birthdays, full home addresses or anything sensitive unless the business truly needs it.

  6. Clean the photos

    Paste the prompt below. Claude strips hidden metadata from every image and lists photos that might show faces, house numbers, license plates or paperwork so you can look at each one.

  7. Keep business info only

    The site shows the business phone, business email and service area. Never the owner's personal cell (unless that's their business line and they asked), their home address, or employees' names without permission.

Copy-paste prompt
Help me lock down this site's forms, keys and private info. I built it.
1. Search every file for API keys, tokens and passwords. Tell me which are public-by-design and which are secret. If any secret key is in the files, tell me which service it's from so I can rotate it in that dashboard, then move it to an environment variable. Never print the full key.
2. Add a .gitignore that blocks .env files, notes and drafts.
3. Check the quote form: add a honeypot spam field, make sure the owner's email isn't visible in the page code, and keep the fields to name, phone or email, and message.
4. Strip location and camera metadata from every image in the photos folder, keeping the originals in a backup folder that won't be published.
5. List any photo that might show a face, house number, license plate or paperwork so I can check it myself.
You're done whenNo secret keys in any file, the form has spam protection and hides the owner's email, and every photo is stripped and looked at.
Watch outThinking a leaked key is fixed once you delete it from the file. It isn't. Rotate it in the service's dashboard first, because the old version is still in your history.
Lesson 14.3 · 8 min

A plain-English security report for the client

Owners don't want headers and acronyms. They want to know: is my site OK, what's wrong, and what does it cost to fix. A short, honest report builds trust and can lead to a care plan.

  1. Get permission in writing

    Only write reports on sites you built or that the owner asked you to check. A one-line text from them ("Yes, please check my website") saved in their folder is enough.

  2. Run your checks

    Use the checks from the last two lessons on the live site. Keep a note of the evidence for each problem: the exact page, header or file.

  3. Rank each finding by how serious it is

    Use four levels: Critical (fix today, like an exposed secret key), High (likely to be abused), Medium (hardening gaps like missing headers) and Low (good practice).

  4. Write the report with Claude

    Paste the prompt below with your findings. Each problem gets one plain sentence on what it is, why it matters, and the exact fix.

  5. Keep it honest

    Don't make problems sound scarier than they are, and never say a site is "100% secure." Say what you checked, what you found, and what you didn't check.

  6. End with the top three fixes

    Finish the report with "Do these first" so the owner knows exactly where to start, and offer to do the fixes or cover them in your care plan.

  7. Save and send it

    Export it as a PDF, save it in the client folder, and send it with a short friendly message. Never include passwords or full keys in the report.

Copy-paste prompt
Write a plain-English website security report for [Business name] ([domain.com]). I built or am authorized to check this site. Here are my findings and evidence:
[paste findings]
For each finding: a severity (Critical, High, Medium or Low), what it is in one plain sentence, the evidence, why it matters to their business, and the exact fix. Never show a full key or password; show only the first 6 characters. Add a short section on what I checked and what I didn't. End with "Do these first": the top 3 fixes. Keep it to two pages, no jargon without a one-line explanation, and don't overstate the risk or promise the site is fully secure. Save it as security-report-[domain]-[date].md and a print-friendly HTML version.
You're done whenYou have a two-page report saved in the client folder with severities, evidence, fixes and a top-three list, ready to send as a PDF.
Watch outUsing security reports as a scare tactic to pitch strangers. Don't scan sites you weren't asked to check. Offer the report to your own clients, or to owners who said yes first.