dig
Quick Reference
Command Name:
dig
Category:
networking
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
- 1
DNS troubleshooting
Diagnose and resolve DNS-related networking issues
- 2
Domain verification
Verify DNS records for domains you own or manage
- 3
DNS propagation checking
Check if DNS changes have propagated across the internet
- 4
Security analysis
Examine DNS security configurations like DNSSEC
Syntax
dig [@server] [name] [type] [options]
Options
Option | Description |
---|---|
@server |
Specify the DNS server to query (IP address or hostname) |
-4 |
Use IPv4 only for query transport |
-6 |
Use IPv6 only for query transport |
-b address |
Set the source IP address of the query |
-p port |
Set the port to query (default is 53) |
-t type |
Set the query type (A, MX, NS, etc.) |
+[no]tcp |
Use TCP instead of UDP |
+[no]dnssec |
Request DNSSEC records |
+[no]short |
Display terse answer |
+[no]identify |
Show IP address and port of responder |
+[no]trace |
Trace delegation from root down to name |
Examples
How to Use These Examples
The examples below show common ways to use the dig
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.