How to Use the doggo Command in Linux for Modern DNS Lookups and Diagnostics

Querying Domain Name System (DNS) records is fundamental to web server administration, email domain authentication, and network troubleshooting. While legacy utilities like nslookup, host, and dig have served Linux administrators for decades, their terminal outputs are frequently verbose, uncoloured, and awkward to parse. Furthermore, testing modern encrypted DNS protocols—such as DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT)—traditionally required unwieldy third-party wrappers. doggo is a modern, Go-powered command-line DNS client designed with colorful output, structured tables, and built-in encrypted protocol support.

Why Replace dig with doggo?

Created by Mr-Karan, doggo addresses the key limitations of traditional BIND utilities:

  • Human-Friendly Visual Output: Prints concise, colour-coded tables that cleanly display record types, TTLs, IP addresses, and DNS server response times without cryptic header noise.
  • Native Encrypted DNS Support: Directly queries DNS-over-HTTPS (DoH), DNS-over-TLS (DoT), and DNSCrypt endpoints without requiring local proxy daemons.
  • Multiple Resolver Comparisons: Compares query responses across multiple DNS resolvers (e.g., Cloudflare, Google, and Quad9) simultaneously.
  • Machine-Readable JSON Output: Includes built-in --json formatting for effortless scripting and CI/CD validation.
  • Reverse DNS and IP Search: Automatically identifies PTR records for IPv4 and IPv6 addresses.

Installing doggo on Linux Distributions

Because doggo is distributed as a single static Go binary, installation takes seconds across any distribution:

Using the Official Install Script (Universal)

curl -sS https://raw.githubusercontent.com/mr-karan/doggo/main/install.sh | sudo sh

Ubuntu & Debian (Pre-Built Binary)

You can download the latest .deb package from the official GitHub releases page:

wget https://github.com/mr-karan/doggo/releases/latest/download/doggo_linux_amd64.deb
sudo dpkg -i doggo_linux_amd64.deb

Arch Linux and Manjaro

sudo pacman -S doggo

Go Install (Cross-Platform)

go install github.com/mr-karan/doggo/cmd/doggo@latest

Basic DNS Lookups with doggo

To perform a standard A-record query for a domain, simply run doggo followed by the hostname:

doggo example.com

Unlike dig, which prints dozens of lines of debugging comments and flags, doggo outputs a structured table:

NAME         TYPE  CLASS  TTL   ADDRESS       NAMESERVER
example.com. A     IN     3600  93.184.216.34 1.1.1.1:53

Querying Specific DNS Record Types

You can request specific record types (such as MX, TXT, CNAME, NS, or SOA) by supplying the record type as an argument:

  • Query Mail Records (MX): doggo example.com MX
  • Query SPF / Verification Records (TXT): doggo example.com TXT
  • Query IPv6 Address (AAAA): doggo example.com AAAA
  • Query Name Servers (NS): doggo example.com NS

Querying Custom Nameservers and Resolvers

To bypass your local ISP resolver and test propagation on external public DNS providers, specify the server using the @ prefix:

doggo example.com @8.8.8.8

You can also query multiple nameservers at once to compare propagation speeds across global networks:

doggo example.com @1.1.1.1 @8.8.8.8 @9.9.9.9

doggo queries all three resolvers concurrently and displays a grouped table indicating the exact response latency from each provider in milliseconds.

Using Encrypted DNS: DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT)

A standout feature of doggo is native support for modern secure transport protocols without extra tools like stunnel:

1. Querying via DNS-over-HTTPS (DoH)

doggo example.com @https://cloudflare-dns.com/dns-query

2. Querying via DNS-over-TLS (DoT)

doggo example.com @tls://dns.quad9.net

These commands establish TLS/HTTPS handshakes directly, confirming whether encrypted resolvers return identical record routing while auditing secure connection latency.

Outputting Machine-Readable JSON

For DevOps engineers building automated monitoring scripts or health checks, doggo generates structured JSON:

doggo example.com --json | jq '.responses[0].answers'

This allows you to pipe DNS records directly into automation suites without regex parsing, making doggo a premier CLI diagnostic tool for modern Linux administrators.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.