dig explanations
Short Answers vs Detailed Answers
By default, dig will show you the detailed answer. The detailed answers will show you the source address, port, query type, class and the IP address.
Here is an example of a detailed answer:
Microsoft Windows [Version 10.0.19044.2130]
(c) Microsoft Corporation. All rights reserved.
C: \Users\asus>dig example.com
; <<>> DiG 9.16.33 <<>> example.com
;; global options: +md
;; Got answer:
;; ->>HEADERくく- opcode: QUERY, status: NOERROR, id: 62896
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; up: 1232
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 64503 IN 93.184.216.34
;; Query time: 225 msec
;; SERVER: 10.99.0.1#53(10.99.0.1)
;; WHEN: Sun Oct 23 12:05:08 SE Asia Standard Time 2022
;; MSG SIZE revd: 56
You can also display the short form answers using
+short
. The short form answer will only show the IP address.
Here is an example of a short answer that only shows the IP address:
C: \Users \asus>dig example.com +short
93.184.216.34