Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. dns

dns

BSD-3-ClauseGo

A complete, fast, and lean DNS library for Go, supporting all Resource Records, DNSSEC, and both client and server programming.

Visit WebsiteGitHubGitHub
8.7k stars1.2k forks0 contributors

What is dns?

miekg/dns is a DNS library written in Go that provides a complete implementation of the Domain Name System protocol. It enables developers to build DNS servers, resolvers, and tools with support for all standard Resource Records, DNSSEC, and modern extensions like DNS over TLS. The library solves the need for a reliable, high-performance DNS programming toolkit in the Go ecosystem.

Target Audience

Go developers building DNS servers, resolvers, monitoring tools, or any application requiring low-level DNS protocol handling. It's also used by projects like CoreDNS, Consul, and other infrastructure tools.

Value Proposition

Developers choose miekg/dns for its comprehensive RFC compliance, lean API design, and performance. It stands out by supporting both client and server programming, full DNSSEC capabilities, and a philosophy that avoids bloat while keeping up with evolving DNS standards.

Overview

DNS library in Go

Use Cases

Best For

  • Building custom DNS servers or authoritative name servers in Go
  • Implementing DNS resolvers or caching proxies
  • Adding DNSSEC signing or validation to DNS applications
  • Creating DNS monitoring, testing, or debugging tools
  • Developing DNS-based service discovery systems
  • Parsing and generating DNS zone files programmatically

Not Ideal For

  • Teams needing a high-level, abstracted DNS API with convenience functions for common tasks
  • Projects requiring built-in DNS caching or recursive resolver logic out of the box
  • Developers looking for extensive documentation, tutorials, or GUI configuration tools
  • Applications where DNS is a minor feature and a simpler, higher-level library suffices

Pros & Cons

Pros

Full RFC Compliance

Supports all DNS Resource Records and a wide range of RFCs, from core standards to modern extensions like DNS over TLS and DNSSEC, as listed in the README with over 50 supported RFCs.

Comprehensive DNSSEC Support

Includes signing, validating, and key generation for multiple algorithms (DSA, RSA, ECDSA, Ed25519), making it suitable for secure DNS operations without external dependencies.

High Performance Design

Emphasizes lean, efficient code with a minimal API, and version 2 is noted to be 2x faster, as mentioned in the README's performance goals.

Server and Client Versatility

Enables building both DNS servers (mimicking net/http patterns) and client-side resolvers, with support for UDP/TCP, IPv4/IPv6, and advanced features like AXFR/IXFR.

Wide Adoption

Used by major projects like CoreDNS, Consul, and others listed in the README, indicating reliability and community trust in production environments.

Cons

Minimalistic API Philosophy

Follows a 'less is more' approach that avoids convenience functions, requiring developers to handle low-level DNS details manually, which can increase development time for common tasks.

Sparse Documentation and Examples

Examples are separated into a different repository (github.com/miekg/exdns), and the README provides only basic guidance, making it harder for newcomers to get started quickly.

Maintenance and Version Confusion

The README states that version 2 is hosted elsewhere and this repo may be archived, leading to potential fragmentation and uncertainty about long-term support.

No Built-in Advanced Features

Lacks out-of-the-box features like caching, load balancing, or DNS over HTTPS support, requiring additional implementation effort for comprehensive resolver or server functionality.

Frequently Asked Questions

Quick Stats

Stars8,675
Forks1,190
Contributors0
Open Issues2
Last commit22 days ago
CreatedSince 2010

Tags

#server-side#dns#go-library#network-programming#client-side#go

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

fasthttpfasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Stars23,341
Forks1,816
Last commit4 days ago
webrtcwebrtc

Pure Go implementation of the WebRTC API

Stars16,238
Forks1,835
Last commit3 days ago
kcptunkcptun

Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.

Stars14,406
Forks2,629
Last commit16 days ago
cloudflaredcloudflared

Cloudflare Tunnel client

Stars13,929
Forks1,262
Last commit9 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub