← All posts
1 min read

How I Built This Site (and Broke It Once)

From buying a domain to a live, hardened blog on Cloudflare, including the 525 error that taught me a lesson about leftover DNS records.

  • meta
  • cloudflare
  • astro
  • dns

I wanted a place to document my security labs, so I built one. This is the full path from nothing to a live site, including the part where it broke.

The stack

  • Astro builds the site from Markdown files. No database, no server, almost nothing to patch.
  • GitHub stores the source and keeps a history of every change.
  • Cloudflare builds and serves the site, handles DNS and provides HTTPS.

Pushing a commit to GitHub is the entire deployment process.

The domain

I registered icarussecurity.net at GoDaddy, then moved DNS to Cloudflare by switching the nameservers. Along the way I turned on 2FA, auto-renew and the registrar lock. Losing a registrar account means losing the domain, so that came first.

The 525 error

The first load of the site returned a 525 SSL handshake failed error. Cloudflare reported that everything was working, so the problem was somewhere else.

When I connected the domain, Cloudflare imported GoDaddy’s old DNS records, including two A records pointing at GoDaddy’s parking-page servers. Cloudflare was dutifully forwarding visitors to a server that could not complete a secure connection.

The fix:

  1. Delete the two stale A records.
  2. Attach the custom domain to the Cloudflare project so it creates the correct record itself.
  3. Reload in a private window to dodge cached results.

Lesson: when you move DNS, audit every imported record. Leftovers from the old provider can silently override what you meant to do.

Hardening

A security blog should not be sloppy about its own security. The site ships with:

  • A strict Content Security Policy with no third-party scripts.
  • HSTS, X-Frame-Options, Referrer-Policy and a locked-down Permissions-Policy.
  • Self-hosted fonts, so visitors never touch a third-party CDN.
  • A security.txt so researchers know how to reach me.

What’s next

More labs, more writeups, and probably more things breaking. I’ll document those too.