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
Have you tried dig +all? (Untested by me, at work, I usually use +short)
+ALL makes no difference. Isn’t it the default setting?
Thanks. That seems to explain things - www.domain.tld is not returned, nor are the DKIM etc records.
Why are these A or TXT records not returned, ie not considered to be A/TXT records, when they plainly are?
Zone Transfers are a whole new ‘can of worms’!
Regards =dn
Can you provide an example of an A and TXT record not returned when we query danceswithmice.info?
www.danceswithmice.info A
dig danceswithmice.info -t a
is only going to return A records for danceswithmice.info.
It will not return www.danceswithmice.info
or foo.danceswithmice.info
, etc.
Without getting into zone transfers (which will likely require some config to allow zone transfers for your domain), I don’t think it’s possible for dig to give you records for subdomains.