Or alternatively, if you can running the DNS server yourself in BIND examine the dns files, usually located in /etc/namedb
Main Topics
Browse All Topicsis there a way I can get a list of all the dns records (A, CNAME, MX, etc) associated with a domain?
I tried using nslookup, then "list mydomain.com" but nothing. I know there must be some simple command either in Win or Unix that will allow me to do this.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
is there a way I can get a list of all the dns records (A, CNAME, MX, etc) associated with a domain?
there are two possible ways to understand your question:
1) How to list all records below some domain name.
Usually it's done from interactive nslookup mode, not from batch mode
nslookup - your_dns_server
>set q=any
>ls -d domain.name
listing may be prohibited by administrator or by firewall settings, in that case you get empty output or 'not implenented' errors.
2) How to get all records of the domain name itself.
in that case you need to run
on Windows:
nslookup -"set q=all" yourdomain.com
onUnix:
nslookup -q=any yourdomain.com
>There is no command on UNIX
>> there must be some simple command either in Win or Unix
>at least not in UNIX
Stop saying that! It's simply not true.
Of course there is a simple command, given that the remote DNS server that hosts the zone is willing to transfer the zone to you - it's:
dig @primary-nameserver.exampl
Which effectively downloads the zone as if you were a secondary nameserver.
Cheers,
-Jon
as Jon and I (see http:#16622504 )said, the DNS server has to allow a listing
then nslookup, dig, some others kan list the domain on any OS and on windoze
Try this:
# dig mydomain.com axfr
As already said, access restriction may apply.
If you don't have dig on your Unix box you'll have to get it from the different sources (tell me which Unix brand you have and I'll point you to the correct location).
For Solaris (SPARC or x86) this would be http://www.sunfreeware.com
Vanbili,
a) the problem is that the command "host" (suggested by ravenpl) is not usually available.
b) nslookup is always available (as Nopius sugegsted) -- but not always reliable.
c) Using "dig" (The--Captain) would be the best (but some Unix variants don't have it either :-( )
Therefore, all three contributed to the solution in different ways ...
JustUNIX,
Where you had been last 2 weeks when 4 experts made a recommendation what to happen with the question and all of them agreed?
However - I stand behind my recommendation.
On a very side note: You posted in this question for the first time 3 MONTHS after all the discussion had stopped. I am not quite sure if anyone needs a solution 3 months later. Had it not been the slip in cleanup, this would had been closed by this time.
Maybe you can try to answer to questions AND pings in time? You may find that the Askers actually return if you post when they need help.
PS: And if you cannot type a simple name as Venabili, just copy it. It does not take so much time.
>>hey, Venabili sometimes there's more to do than EE :-))
ahoffmann,
It was not for you :) And why I hear this line always less than an hour after my comment and always from people that had been not answering for days/weeks/months and had just realised they do not take points? Nothing personal - just observation... :) Kind of strange, isn't it? :) And actually you DID agree to the award to ravenpl?
ravenpl,
I would agree for the dig but it was ahoffmann who mentioned it. JustUNIX came too late and did not really added new information...
>I would agree for the dig but it was ahoffmann who mentioned it
No, it was The--Captain that mentioned it
>If totally unsure, ask the PE here, who will vote for a split now, I'm pretty sure ;-)
As long as we can arrive at a consensus, I don't care what happens. IMO, the bottom line is that there exist cmdline solutions for zone transfers, and raven pointed that out first.
Cheers,
-Jon
Guys,
I asked what to recommend. 4 of you said "award ravenpl" (including the PE). I decided to agree with the 4 of you . And now we have all this again... This is what really confuses me - if it wasa direct recommendation, I would most probably be back reading and reading again but after a ping and supposedly agreeance of everyone?
OK -- to finish this up:
ravenpl pointed out that there is a cmd available (host). So he deserves the points.
I only wanted to add that there is more than this and it will not help in many cases ...
Sometimes, Unix has many different ways to offer for sultions -- and the many variants
(including a whole vast of Linuxes) add to this.
Given that this thread is 2/3 years old, I am finding it hard to reconcile the comment by ravenpl that nslookup and host have been "dropped" by most modern OSes. Can you clarify on this ravenpl?
I use Windows XP, Vista and 7, RHEL 5.3, Fedora 11, and Ubuntu 9.x, as well as an older Fedora 4 box that is soon to be obsoleted, which pretty much covers* the range of commonly** used modern OSes, and every one of them still have both commands. I agree that dig is better, but doesn't exist on Windows of any flavour that I am aware of, and sometimes you don't need all of that information anyway. When it is needed, it is a godsend.
* given that RHEL/Fedora/CentOS and Debian/Ubuntu are the most prolific major branches of Linux
** as in many tens of thousands of users or more.
Business Accounts
Answer for Membership
by: ravenplPosted on 2006-05-03 at 09:34:17ID: 16597781
First of all, the DNS server have to allow for listing entries, and or security reasons it usually allows that only to dns slaves (and slaves for noone).
host -al domain.tld dns.server.for.domain.tld