← All work
Engineering · 2023

Netlify DNS Zone-File Exporter (Go CLI)

Overview

A small Go command-line tool that reads DNS records from the Netlify API and emits standard .zone files, enabling DNS migration from Netlify (which has no zone-file export) to providers like Cloudflare that support zone-file import. Used/adapted from a public open-source project.

Why It Exists

Netlify can’t export DNS records as a zone file, which makes moving domains elsewhere painful. This tool closes that gap by reconstructing a portable zone file from Netlify’s API, a clean fit when consolidating DNS onto another provider.

What We Built

A single-binary Go program (main.go) that authenticates with a Netlify personal access token, lists DNS zones and records via the Netlify Open API, and serializes each zone into a conventional zone file. It ships with go.mod, a .replit/replit.nix so it runs one-click on Replit, and README usage for both Replit and local execution.

Technologies & Approach

Plain Go using the standard net/http and encoding/json libraries, no heavy dependencies, mapping Netlify’s DnsZone/DnsRecord API shapes to zone-file output. Replit packaging lowers the barrier to running it ad hoc.

Outcome / Impact

A practical migration aid that turns an unsupported export into a one-command operation. Honestly framed as use/evaluation of an existing OSS tool; value is the demonstrated DNS-tooling and Go CLI fluency.

Capabilities Demonstrated

  • DNS migration and zone-file generation
  • Go CLI development against third-party APIs
  • Pragmatic, dependency-light tooling
More work See all →