Haydn Cowley

Write-ups

Locking down my domain: fake emails, faked DNS and a way to report bugs

My domain only hosts a website, but anyone could still send emails pretending to be from it. I blocked that, signed my DNS and added security.txt.

3 min readBy Haydn
Goal
Stop people faking emails or DNS for my domain
Result
2 email issues to none, DNSSEC on
Tools
Cloudflare DNS, NCSC email check, Verisign DNSSEC analyzer

Why bother on a website-only domain?

haydnhomelab.com never sends email. But email lets anyone write any address in the "From" line, so without the right DNS records someone could send a phishing email that looks like it came from me, and other mail servers would have nothing telling them to reject it. A domain nobody watches is an easy one to borrow.

DNS has a similar gap. When you visit my site, your computer asks DNS where it lives. Without DNSSEC, those answers aren't signed, so in the right position an attacker could fake one and send you somewhere else.

1. Blocking fake emails

I ran my domain through the NCSC's free email security check first. It found 2 issues: no DMARC and no SPF record.

NCSC email security check: 2 issues found, DMARC and SPF record flagged
Before: DMARC and SPF missing.

I checked Cloudflare had no MX records (so nothing receives email for the domain), then added three TXT records:

# SPF: no server is allowed to send email as this domain
TXT  @             v=spf1 -all

# DMARC: reject anything that fails, for subdomains too
TXT  _dmarc        v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s

# DKIM: there are no signing keys, so any "signed" email is fake
TXT  *._domainkey  v=DKIM1; p=

A few minutes later the same check came back clean.

NCSC email security check: no issues found, DMARC and SPF passing
After: no issues.

2. Signing my DNS with DNSSEC

The Verisign DNSSEC analyzer showed that the internet's root and the .com zone were already signed, but my domain had no keys and no signatures.

Verisign DNSSEC analyzer before: no DS records, no DNSKEY records and no RRSIGs for haydnhomelab.com. Addresses blacked out.
Before: no keys or signatures. Addresses blacked out.

In Cloudflare it's one switch: DNS, Settings, Enable DNSSEC. Straight away the analyzer found my domain's keys and verified signatures on its records.

Verisign DNSSEC analyzer after: DNSKEY records found and signatures verified for haydnhomelab.com, DS record not yet in the com zone. Addresses blacked out.
After: keys and signatures verified. Addresses blacked out.

The one red line left is the DS record, the link that tells .com to trust my keys. Because I bought the domain through Cloudflare, it adds that itself, which can take up to a day or two.

3. A way to report problems

If someone finds a security problem on my site, they need to know who to tell. security.txt (RFC 9116) is the standard place to look, so I added one:

$ curl https://haydnhomelab.com/.well-known/security.txt
Contact: mailto:[email protected]
Expires: 2027-11-01T00:00:00.000Z
Preferred-Languages: en
Canonical: https://haydnhomelab.com/.well-known/security.txt

Easy to get wrong: these email records are only right because the domain sends no email. If I ever set up email on it, I'd have to change SPF and DMARC first, or my own emails would be rejected. The Expires date in security.txt also has to be renewed every year.

What I learned

  • A domain that doesn't send email still needs SPF and DMARC, or anyone can borrow it for phishing.
  • DNSSEC works as a chain: root, then .com, then my domain. One missing link and it isn't trusted yet.
  • Free tools like the NCSC check make before and after easy to prove.

How I used AI: Claude explained what each record does, gave me the exact values and steps, and wrote security.txt and this page. I added the records and switched on DNSSEC in Cloudflare, and ran every check myself. The full, unedited notes are in my build log.