Skip to main content

Switching to BunnyDNS

·407 words·2 mins

Recently I was accepted onto the BunnyDNS Beta, something that I have been looking forward to trailing for some time. My goal was to be able to sunset my authoritative DNS servers hosted on DigitalOcean.

I’ve been using BunnyCDN to host most of my sites for the last 2 years. Deploying static sites using a combination of Hugo and GitHub Actions, or manually uploading HTML was a welcome step in reducing my administative overhead with keeping my sites up, patched, and cost effective. However, I still needed to host my own authoritative DNS servers to allow for the apex of my domains (for example expertatnothing.com) to point at the correct location provided by BunnyCDN.

BunnyCDN uses CNAME records to allow custom domains, but the apex of a domain cannot be used with CNAMEs. Some DNS providers provide ALIAS functionality to provide CNAME flattening (aka ANAMEing or ANAME records) to allow the apex to be configured like a CNAME record would be for any subdomain but DigitalOcean doesn’t provide this capability. My solution was to make use of PowerDNS as an authoritative DNS server which does allow the apex to be set to point at another location like a CNAME does, which it achieves by resolving the configured destinationa domain locations to an IP address when the A record is requested for the apex of the domain.

While my solution worked well and allowed for BunnyCDN to handle traffic for the apex of my domains and www subdomains, I still had to maintain my servers and keep them secure in addition to needing to remember how to add new records and zones. Preferably I’d be able to use a low cost service is easy to configure, resilient, and fast - which is exactly what BunnyDNS provides.

BunnyDNS is integrated with BunnyCDN and allows for a DNS record setup in BunnyDNS to map directly to a hosted zone, removing the need for me to have my own DNS servers allowing me to further remove infrastructure and reduce cost! BunnyDNS also allows for redirects to be setup on the apex of domains and that’s what I’ve started using to redirect users to my www subdomains which then point at my hosted zone.

DNS records in a zone on BunnyDNS

Having used BunnyDNS for the last couple of months I’ve experienced no issues, and there’s even logging that can be enabled to show the DNS requests being made and the responses that BunnyDNS has provided back and statistics.

DNS logs for a on BunnyDNS

DNS statistics on BunnyDNS