Use dig Instead of ping to Check Network Connections

December 2025

This is a note to remind myself that dig is generally the tool that I want to use instead of ping when I'm checking for an IP address for a domain.

For example:

dig example.com

outputs:

Output
; <<>> DiG 9.10.6 <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64532
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;example.com.			IN	A

;; ANSWER SECTION:
example.com.		156	IN	A	104.18.26.120
example.com.		156	IN	A	104.18.27.120

;; Query time: 27 msec
;; SERVER: 2001:558:feed::1#53(2001:558:feed::1)
;; WHEN: Sat Dec 27 20:39:53 CST 2025
;; MSG SIZE  rcvd: 72

very cool.

-a

end of line