Multiple responses from drill, dig, or

A domain’s DNS may include multiple records of the same type, eg A, CNAME, TXT.
The traditional dig example.com -t TXT will only return the first record.
How to persuade one or other of such tools to return ALL the records of a nominated type?
Please advise =dn

Is the option ANY you are looking for?

Like:
dig example.com -t TXT ANY

p.s.
If you compair with google.com you can see more. I think example.com just not has so much more.

Sadly no - if it worked the way the help said, I wouldn’t have wasted your time, and hence my surprise…

dig danceswithmice.info -t TXT ANY +short
“v=spf1 ip4:51.254.211.219 -all”

(same content in full-listing)

Looking at the DNS server, there are many more TXT records - and they are read correctly in their specific contexts. (same for A, MX, and CNAME records)

Looks like dig eddiejennings.net -t TXT is working as intended, since it returned two results. Are all of your txt records for the top level danceswithmice.info? Or are some like a DKIM txt record, some-selector._domainkey.danceswithmice.info? I think to see all of the records like that, you’ll have to do a zone transfer.

dig eddiejennings.net -t TXT

; <<>> DiG 9.18.8 <<>> eddiejennings.net -t TXT
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39929
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;eddiejennings.net.		IN	TXT

;; ANSWER SECTION:
eddiejennings.net.	219	IN	TXT	"v=spf1 include:zoho.com -all"
eddiejennings.net.	219	IN	TXT	"MS=ms24164931"

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Sun Jan 22 21:36:04 EST 2023
;; MSG SIZE  rcvd: 113

3 Likes

Have you tried dig +all? (Untested by me, at work, I usually use +short)