DNS replies contain protocol details that matter during troubleshooting, but those headers and statistics can obscure the record values needed for a quick lookup. The +short option makes dig print the returned data without the normal response envelope.
Short output keeps each record type's presentation format. Address records appear as one address per line, while MX records retain the preference number and mail exchanger name. Multiple answers can arrive in a different order on later lookups.
The compact form does not show the DNS response status. A received reply with no answer records can therefore produce no lines for either a missing record type or a nonexistent name. Retry an empty result without +short to read the DNS status; if no server replies, dig prints a communications error and exits with status 9 instead of presenting an unexplained blank result.
Related: How to query DNS records with dig
Related: How to compare DNS answers across resolvers with dig
Tool: DNS Record Lookup
$ dig +short example.com A 172.66.147.243 104.20.23.154
+short removes the owner name, TTL, record class, record type, response status, and query statistics. Each returned address occupies its own line.
$ dig +short example.com MX 0 .
The number is the MX preference. A single dot is a null mail exchanger, which declares that the domain does not accept email.
$ dig +short no-such-name.invalid A
No output follows the command because +short does not display the NXDOMAIN response status.
$ dig no-such-name.invalid A ##### snipped ##### ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55544 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ##### snipped #####
NXDOMAIN confirms that the queried name does not exist. dig still exits with status 0 because it received a DNS response; a no-reply failure uses exit status 9.
$ dig +short example.com A 172.66.147.243 104.20.23.154