Usage Examples
These examples showcase how to combine different features for powerful DNS querying.
Basic Queries
-
Simple A record lookup:
-
Query for a specific record type:
-
Query multiple record types simultaneously:
Using Different Resolvers
-
Query using a specific DNS resolver:
-
Use DNS-over-HTTPS (DoH):
-
Use DNS-over-TLS (DoT):
-
Query multiple resolvers and compare results:
Advanced Queries
-
Perform a reverse DNS lookup:
-
Set query flags for DNSSEC validation:
-
Use the short output format for concise results:
-
Show query timing information:
Combining Flags
-
Perform a reverse lookup with short output and custom resolver:
-
Query for MX records using DoH with JSON output:
-
Use IPv6 only with a specific timeout and DNSSEC checking:
Scripting and Automation
-
Use JSON output for easy parsing in scripts:
-
Batch query multiple domains from a file:
-
Find all nameservers for a domain and its parent domains:
-
Extract all MX records and their priorities:
-
Count the number of IPv6 addresses for a domain:
Troubleshooting and Debugging
-
Enable debug logging for verbose output:
-
Compare responses with and without EDNS Client Subnet:
-
Test DNSSEC validation:
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).
-
Compare responses with and without EDNS Client Subnet:
-
Check for DNSSEC records (DNSKEY, DS, RRSIG):
-
Verify DNSSEC chain of trust: