Putting a Bunny.net CDN in Front of My Static Blog

speckx1 pts0 comments

Putting a Bunny.net CDN in Front of My Static Blog | Hammer Tech Blog August 14, 2026 · 14 min read · 0 views

#CDN<br>#Traefik<br>#Astro<br>#Self-Hosting<br>#Let's Encrypt<br>Share

Table of contents<br>My Blog Is an International Success

Okay, my blog is successful now. It gets like 3 hits a day from Google. And looking at my Umami dashboard, most of those aren’t from Germany. Not even from Europe.

My server sits in Frankfurt. So everyone overseas waits forever for what is basically a text file. Unacceptable.

So I started digging into CDNs. I’d heard of them, never actually read up on how they work. For anyone else in that boat: a CDN (content delivery network) takes a copy of your site and caches it on servers all over the world. This way the whole world gets to experience my blog at blazing fast speeds.

With a static site this should be simple. So I thought.

Setting up my server to use the CDN is one thing, but the domain configuration opens a whole can of worms. My blog uses an apex domain without a subdomain, so I can’t simply CNAME it to the CDN. Changing the nameservers would break my Let’s Encrypt workflow, which talks to the netcup API for the DNS challenge. And that same domain handles my email, which I really cannot have fail.

Choosing a CDN

The obvious choice everyone knows would be Cloudflare. They’re the biggest player in the game. But it’s an American company, and I try to avoid those where I can, because of a certain unpredictable orange man. So that’s out.

After a quick DuckDuckGo search I found bunny.net. A CDN based in Slovenia. Great reviews, and cheap enough that my wife won’t notice.

Keeping the apex domain hmmr.online meant moving my DNS over to Bunny. Which turned out to be surprisingly easy. There’s an auto import option: type in your domain name and the tool fetches your current DNS settings.

It worked. But it also made things up.

alpha.hmmr.online. www3.hmmr.online. Records I have never in my life set up, both pointing at my server. No idea where it got those. You can delete them before the import goes through, so no harm done. Still weird.

All I actually needed was the record pointing hmmr.online at my server, plus the ones for the mail server.

Then back over to netcup to switch my domain from the netcup nameservers to Bunny’s. So far so good. And the email I was so worried about didn’t care at all. MX and SPF came over with the import and mail just kept arriving.

The Not So Fun Part

A CDN fundamentally changes how the page gets served, which meant a massive overhaul of my privacy statement. Definitely the least fun part of this endeavour. I almost cried, but I can proudly say it now reflects the implementation of my new CDN.

I don’t want to bore you with the details. If you’re really interested for some reason, you can read the whole thing here.

Setting Up the Pull Zone

Now that my domain was ready it was time for the pull zone. I YOLO’d it and just created one. Documentation is for suckers.

Most of the time this works fine. Not this time. My blog was gone, replaced by a beautiful error page from Bunny. The server is unreachable it said. Always exciting to work on the live page.

So, back to the start. Deleted the pull zone, my blog came back, and then I actually read up on how to set one up properly.

A pull zone needs an origin it can pull from (duh). And obviously I can’t just point it at hmmr.online, because that’s where the CDN gets delivered. One option is to set up a separate subdomain like origin.yourdomain.com and pull from that. For my blog that wouldn’t be a big issue, but a subdomain like that makes it easy to bypass the CDN entirely. Not what I want.

The other option is pointing it at the IP of your server. And here’s where a neat Bunny feature comes in: in the DNS records I can create a pull zone straight from the list by clicking the bunny next to the A record.

Bunny DNS record list with the pull zone button next to the A record<br>Bunny wires up the DNS record and the pull zone without me having to create anything by hand. Which solves the problem I mentioned at the start, where I can’t CNAME an apex domain. None of this hides my server though. Anyone who digs up the IP can spoof the host header and reach my origin directly. But that takes actual effort, and the prize is my blog without a CDN in front of it.

What I didn’t understand at first was why I couldn’t accelerate my AAAA record. A Bunny pull zone only pulls the origin over IPv4. The page itself still gets served over IPv6 from the CDN, but the AAAA record pointing at my server had to go.

Configuring the Pull Zone

Now it actually worked. The page stayed online. No error page this time.

The pull zone has a shit ton of options, and I’ll admit there are some I still don’t understand. But others are pretty straight forward.

First thing I did was add www.hmmr.online to the list of hostnames. That used to just redirect to the apex domain, but with the CDN in front, the redirect in my Traefik setup didn’t...

pull bunny blog zone from server

Related Articles