How to list ALL DNS records


Is there any way I can list ALL DNS records for a domain?

I know about such things as dig and nslookup but they only go so far. For example, if I've got a subdomain A record as

test A

then unless I specifically ask for it, eg.

dig any

I can't see it.

Is there any way (other than looking at the records by going to the DNS manager) to see exactly what all the DNS records are?

Best Solution

When you query for ANY you will get a list of all records at that level but not below.

# try this
dig any

This may return A records, TXT records, NS records, MX records, etc if the domain name is exactly "". However, it will not return child records (e.g., More precisely, you MAY get these records if they exist. The name server does not have to return these records if it chooses not to do so (for example, to reduce the size of the response).

An AXFR is a zone transfer and is likely what you want. However, these are typically restricted and not available unless you control the zone. You'll usually conduct a zone transfer directly from the authoritative server (the below) and often from a name server that may not be published (a stealth name server).

# This will return "Transfer failed"
dig axfr

If you have control of the zone, you can set it up to get transfers that are protected with a TSIG key. This is a shared secret the the client can send to the server to authorize the transfer.

Related Question