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

; EDNS: version: 0, flags:; up: 1232
;example.com.               IN              A

example.com.    64503       IN    

;; Query time: 225 msec
;; WHEN: Sun Oct 23 12:05:08 SE Asia Standard Time 2022
;; MSG SIZE revd: 56

Example of dig command on Windows

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

Example of dig command with short option on Windows