Skip to content

Usage Examples

These examples showcase how to combine different features for powerful DNS querying.

Basic Queries

  1. Simple A record lookup:

    Terminal window
    doggo example.com
  2. Query for a specific record type:

    Terminal window
    doggo AAAA example.com
  3. Query multiple record types simultaneously:

    Terminal window
    doggo A AAAA MX example.com

Using Different Resolvers

  1. Query using a specific DNS resolver:

    Terminal window
    doggo example.com @1.1.1.1
  2. Use DNS-over-HTTPS (DoH):

    Terminal window
    doggo example.com @https://cloudflare-dns.com/dns-query
  3. Use DNS-over-TLS (DoT):

    Terminal window
    doggo example.com @tls://1.1.1.1
  4. Query multiple resolvers and compare results:

    Terminal window
    doggo example.com @1.1.1.1 @8.8.8.8 @9.9.9.9

Advanced Queries

  1. Perform a reverse DNS lookup:

    Terminal window
    doggo --reverse 8.8.8.8
  2. Set query flags for DNSSEC validation:

    Terminal window
    doggo example.com --do --cd
  3. Use the short output format for concise results:

    Terminal window
    doggo example.com --short
  4. Show query timing information:

    Terminal window
    doggo example.com --time

Combining Flags

  1. Perform a reverse lookup with short output and custom resolver:

    Terminal window
    doggo --reverse 8.8.8.8 --short @1.1.1.1
  2. Query for MX records using DoH with JSON output:

    Terminal window
    doggo MX example.com @https://dns.google/dns-query --json
  3. Use IPv6 only with a specific timeout and DNSSEC checking:

    Terminal window
    doggo AAAA example.com -6 --timeout 3s --do

Scripting and Automation

  1. Use JSON output for easy parsing in scripts:

    Terminal window
    doggo example.com --json | jq '.responses[0].answers[].address'
  2. Batch query multiple domains from a file:

    Terminal window
    cat domains.txt | xargs -I {} doggo {} --short
  3. Find all nameservers for a domain and its parent domains:

    Terminal window
    doggo NS example.com example.com. com. . --short
  4. Extract all MX records and their priorities:

    Terminal window
    doggo MX gmail.com --json | jq -r '.responses[0].answers[] | "\(.address) \(.preference)"'
  5. Count the number of IPv6 addresses for a domain:

    Terminal window
    doggo AAAA example.com --json | jq '.responses[0].answers | length'

Troubleshooting and Debugging

  1. Enable debug logging for verbose output:

    Terminal window
    doggo example.com --debug
  2. Compare responses with and without EDNS Client Subnet:

    Terminal window
    doggo example.com @8.8.8.8
    doggo example.com @8.8.8.8 --z
  3. Test DNSSEC validation:

    Terminal window
    doggo rsasecured.net --do @8.8.8.8

    This example uses a domain known to be DNSSEC-signed. The --do flag sets the DNSSEC OK bit.

    Note: DNSSEC validation can be complex and depends on various factors:

    • The domain must be properly DNSSEC-signed
    • The resolver must support DNSSEC
    • The resolver must be configured to perform DNSSEC validation

    If you don’t see DNSSEC-related information in the output, try using a resolver known to support DNSSEC, like 8.8.8.8 (Google) or 9.9.9.9 (Quad9).

  4. Compare responses with and without EDNS Client Subnet:

    Terminal window
    doggo example.com @8.8.8.8
    doggo example.com @8.8.8.8 --z
  5. Check for DNSSEC records (DNSKEY, DS, RRSIG):

    Terminal window
    doggo DNSKEY example.com @8.8.8.8
    doggo DS example.com @8.8.8.8
    doggo RRSIG example.com @8.8.8.8
  6. Verify DNSSEC chain of trust:

    Terminal window
    doggo example.com --type=A --do --cd=false @8.8.8.8