brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: dig ANY no longer shows every record of a domain

Dig
~/tips/tip-dig-any-rfc8482

dig ANY cloudflare.com @ns3.cloudflare.com +noall +answer

Why ANY queries return HINFO or nothing, and what to ask instead.

Old tutorials say dig ANY example.com lists all records of a domain. These days it mostly does not, and the reason is written in the answer itself.

Ask a Cloudflare name server directly:

dig ANY cloudflare.com @ns3.cloudflare.com +noall +answer

The answer is a single odd record: cloudflare.com. 3600 IN HINFO "RFC8482" "". RFC 8482 lets name servers answer ANY with a small subset of records, or with this placeholder, because ANY was popular for amplification attacks. Public resolvers can go further: Cloudflare’s 1.1.1.1 answers with status NOTIMP and no records at all.

So I’d ask for the types you care about. dig takes several queries on one line:

dig +noall +answer example.com A example.com AAAA example.com MX example.com TXT example.com NS

There is no reliable way to list every record of a zone from the outside, and that is on purpose. If it is your own zone, export it from your DNS provider, or use AXFR on a server you run. Some servers still answer ANY in full, especially older setups, which is why the old tutorials seemed to work. Do not build a script on it.

Further reading: dig manual (BIND 9), RFC 8482: minimal ANY responses

Going deeper: Guide: dig for beginners, look up DNS records and read the answer

More Dig tips dig +noall +answer DS example.com dig nope.iana.org @9.9.9.9 | grep -E 'status|SOA' dig +search nas dig @8.8.8.8 www.google.com +subnet=203.0.113.0/24 dig +yaml example.com A All Dig tips (36) All topics

Link