Usage Examples
These examples showcase how to combine different features for powerful DNS querying.
Basic Queries
-
Simple A record lookup:
Terminal window doggo example.com -
Query for a specific record type:
Terminal window doggo AAAA example.com -
Query multiple record types simultaneously:
Terminal window doggo A AAAA MX example.com -
Query using Globalping API from a specific location:
Terminal window doggo example.com --gp-from Germany
Using Different Resolvers
-
Query using a specific DNS resolver:
Terminal window doggo example.com @1.1.1.1 -
Use DNS-over-HTTPS (DoH):
Terminal window doggo example.com @https://cloudflare-dns.com/dns-query -
Use DNS-over-TLS (DoT):
Terminal window doggo example.com @tls://1.1.1.1 -
Query multiple resolvers and compare results:
Terminal window doggo example.com @1.1.1.1 @8.8.8.8 @9.9.9.9 -
Using Globalping API
Terminal window doggo example.com @1.1.1.1 --gp-from Germany
Advanced Queries
-
Perform a reverse DNS lookup:
Terminal window doggo --reverse 8.8.8.8 -
Set query flags for DNSSEC validation:
Terminal window doggo example.com --do --cd -
Use the short output format for concise results:
Terminal window doggo example.com --short -
Show query timing information:
Terminal window doggo example.com --time
Combining Flags
-
Perform a reverse lookup with short output and custom resolver:
Terminal window doggo --reverse 8.8.8.8 --short @1.1.1.1 -
Query for MX records using DoH with JSON output:
Terminal window doggo MX example.com @https://dns.google/dns-query --json -
Use IPv6 only with a specific timeout and DNSSEC checking:
Terminal window doggo AAAA example.com -6 --timeout 3s --do
Scripting and Automation
-
Use JSON output for easy parsing in scripts:
Terminal window doggo example.com --json | jq '.responses[0].answers[].address' -
Batch query multiple domains from a file:
Terminal window cat domains.txt | xargs -I {} doggo {} --short -
Find all nameservers for a domain and its parent domains:
Terminal window doggo NS example.com example.com. com. . --short -
Extract all MX records and their priorities:
Terminal window doggo MX gmail.com --json | jq -r '.responses[0].answers[] | "\(.address) \(.preference)"' -
Count the number of IPv6 addresses for a domain:
Terminal window doggo AAAA example.com --json | jq '.responses[0].answers | length'
EDNS Options
-
Request Name Server Identifier (NSID) to see which server responded:
Terminal window doggo example.com --nsid @1.1.1.1 -
Use EDNS Client Subnet (ECS) for geo-aware CDN responses:
Terminal window doggo example.com --ecs 8.8.8.0/24 @8.8.8.8This is particularly useful for testing how CDNs route traffic based on client location.
-
Compare responses from different geographic locations using ECS:
Terminal window # North America subnetdoggo example.com --ecs 8.8.8.0/24 @8.8.8.8# Europe subnetdoggo example.com --ecs 1.1.1.0/24 @8.8.8.8 -
Real-world example: Test geo-aware DNS with Netflix
Netflix uses geo-aware DNS to route users to regional servers. Query from different locations to see how they return different IP addresses:
Terminal window # From USA (using subnet 8.8.8.0/24)doggo netflix.com --ecs 8.8.8.0/24 @8.8.8.8# Returns: 3.225.92.8 (AWS US-East servers)# From India (using subnet 49.207.0.0/24)doggo netflix.com --ecs 49.207.0.0/24 @8.8.8.8# Returns: 54.246.79.9 (AWS EU-Ireland servers)# From Germany (using subnet 5.9.0.0/24)doggo netflix.com --ecs 5.9.0.0/24 @8.8.8.8# Returns: 54.74.73.31 (AWS EU-Ireland servers)Notice how Netflix returns completely different IP addresses based on your location. This ensures you connect to the closest data center for faster streaming.
Understanding CDN behavior:
- Some services like Netflix use geo-aware DNS (different IPs per region)
- Others like Cloudflare use Anycast (same IPs globally, routing happens at network level)
- ECS lets you test this without actually traveling!
-
Use DNS Cookie for enhanced security:
Terminal window doggo example.com --cookie @1.1.1.1 -
Combine EDNS options for privacy and debugging:
Terminal window doggo example.com --nsid --cookie --padding @1.1.1.1The
--paddingflag helps protect against traffic analysis attacks.
Troubleshooting and Debugging
-
Enable debug logging for verbose output:
Terminal window doggo example.com --debug -
Request Extended DNS Errors (EDE) for detailed failure information:
Terminal window doggo nonexistent.example --ede @1.1.1.1 -
Test DNSSEC validation:
Terminal window doggo rsasecured.net --do @8.8.8.8This example uses a domain known to be DNSSEC-signed. The
--doflag 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).
-
Check for DNSSEC records (DNSKEY, DS, RRSIG):
Terminal window doggo DNSKEY example.com @8.8.8.8doggo DS example.com @8.8.8.8doggo RRSIG example.com @8.8.8.8 -
Verify DNSSEC chain of trust:
Terminal window doggo example.com --type=A --do --cd=false @8.8.8.8
Internationalized Domain Names (IDN)
-
Query Unicode domain names directly:
Terminal window doggo münchen.deDoggo automatically converts Unicode to punycode for DNS queries and displays results in Unicode for readability.
-
Query international domains in different scripts:
Terminal window # German (Umlauts)doggo die-förderer.net# Arabicdoggo مصر.eg# Chinesedoggo 中国.cn# Japanesedoggo 日本.jp -
Use IDN domains with different resolvers:
Terminal window doggo münchen.de @https://dns.google/dns-query
DNS Additional Section (Glue Records)
-
Query TLD nameservers to see glue records:
Terminal window doggo NS com. @a.gtld-servers.net --rd=falseThe Additional section shows IPv4 and IPv6 addresses for nameservers, preventing circular dependencies.
-
Investigate DNS delegation for a domain:
Terminal window doggo NS example.org @a.gtld-servers.net --rd=falseThis reveals how the domain is delegated at the TLD level, including glue records for in-zone nameservers.
-
Query root servers for TLD nameserver information:
Terminal window doggo NS org. @a.root-servers.net --rd=false -
Debug nameserver configuration:
Terminal window doggo NS yourdomain.com @ns1.yourdomain.com --rd=falseVerify that nameserver IPs are correctly configured in glue records.
-
See MX target addresses in Additional section:
Terminal window doggo MX gmail.comThe Additional section may include A/AAAA records for mail servers, optimizing resolution.