Skip to main content

dig

dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output.

A example

The record name dev.viva-sls.com points to the A value: 3.104.46.108.

> dig dev.viva-sls.com

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

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;dev.viva-sls.com. IN A

;; ANSWER SECTION:
dev.viva-sls.com. 60 IN A 3.104.46.108
dev.viva-sls.com. 60 IN A 3.105.81.0

;; Query time: 27 msec
;; SERVER: 2001:8003:1d98:3200::1#53(2001:8003:1d98:3200::1)
;; WHEN: Mon Mar 11 12:25:07 AEDT 2024
;; MSG SIZE rcvd: 77

CNAME example

> dig hubinsights.dev.viva-sls.com

; <<>> DiG 9.10.6 <<>> hubinsights.dev.viva-sls.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29129
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;hubinsights.dev.viva-sls.com. IN A

;; ANSWER SECTION:
hubinsights.dev.viva-sls.com. 300 IN CNAME hub-insights-alb-dev-480244531.ap-southeast-2.elb.amazonaws.com.
hub-insights-alb-dev-480244531.ap-southeast-2.elb.amazonaws.com. 60 IN A 3.105.176.166
hub-insights-alb-dev-480244531.ap-southeast-2.elb.amazonaws.com. 60 IN A 13.54.209.18

;; Query time: 64 msec
;; SERVER: 2001:8003:1d98:3200::1#53(2001:8003:1d98:3200::1)
;; WHEN: Mon Mar 11 12:34:53 AEDT 2024
;; MSG SIZE rcvd: 163

The 300 in hubinsights.dev.viva-sls.com. 300 IN CNAME hub-insights-alb-dev-480244531.ap-southeast-2.elb.amazonaws.com. is the remaining TTL.