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 -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?

dig -t TXT ANY

If you compair with you can see more. I think 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 -t TXT ANY +short
“v=spf1 ip4: -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 -t TXT is working as intended, since it returned two results. Are all of your txt records for the top level Or are some like a DKIM txt record, I think to see all of the records like that, you’ll have to do a zone transfer.

dig -t TXT

; <<>> DiG 9.18.8 <<>> -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

; EDNS: version: 0, flags:; udp: 65494

;; ANSWER SECTION:	219	IN	TXT	"v=spf1 -all"	219	IN	TXT	"MS=ms24164931"

;; Query time: 0 msec
;; WHEN: Sun Jan 22 21:36:04 EST 2023
;; MSG SIZE  rcvd: 113


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