Question

How do I list all the DNS records for a domain?

Asked by: javajoe74

is 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.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-05-03 at 08:13:37ID21836533
Tags

all

,

dns

,

records

,

list

,

domain

Topic

Unix Networking

Participating Experts
10
Points
250
Comments
37

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

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.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

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.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

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.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. CNAME to CNAME?
    Is it possible to point a CNAME to a CNAME? Here's the requirement . . . I have hundreds of customers who I frequently move between different servers so I want to set up www.<theirdomain>.com to CNAME to a single A record on my domain which I can then change to move th...
  2. CNAME in MX record (Urgent)
    I failed to send mail to "cficarbonfilm.com", after i do the mail test in the www.dnsstuff.com, it shows the below content. I dont understand whta is means. Any one can kinldy explain it to me and any advise? Many thanks. I am new to MX and DNS. Getting MX record ...
  3. NSLOOKUP will not resolve MX records
    How do I troubleshoot not being able to resolve MX records using NSLOOKUP?
  4. i have same issue my mx record id mydomain.com
    i am facing same issue ... i have created my mx as shown below mydomaini.com MX preference = 10, mail exchanger = hit-hts.notsameasmydomainname.com hits-hts.notsameasmydomainname.com internet address = 10.10.10.10 please detail how do i fine tune my mx entry... do i n...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

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.

Join the Community

Answers

 

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

 

by: patspamPosted on 2006-05-03 at 18:01:20ID: 16601892

Or alternatively, if you can running the DNS server yourself in BIND examine the dns files, usually located in /etc/namedb

 

by: ravenplPosted on 2006-05-03 at 23:48:44ID: 16603184

Or another alternative: puth that IP into /etc/hosts

 

by: gheistPosted on 2006-05-04 at 14:34:48ID: 16610079

> is there a way

do as many DNS lookups as types of records.

Each DNS server returns different data under ANY class of DNS request.

There is no command on UNIX, nor in Windows.

 

by: NopiusPosted on 2006-05-05 at 22:41:27ID: 16620144

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

 

by: NopiusPosted on 2006-05-05 at 22:43:34ID: 16620152

and I aggree with gheist, 'set=query=ANY' may be unreliable if run against different servers.

 

by: ahoffmannPosted on 2006-05-06 at 11:48:42ID: 16622504

>  is there a way I can get a list of all the dns records
use ls command in nslookup, if that does not return the list you have to ask the admin of the DNS server
anything else is guessing

 

by: hiteshgupta1Posted on 2006-05-11 at 00:00:02ID: 16655781

>> there must be some simple command either in Win or Unix
at least not in UNIX

 

by: ravenplPosted on 2006-05-11 at 00:07:57ID: 16655814

what about mentioned in very first comment
host -al domain.tld dns.server.for.domain.tld

 

by: The--CaptainPosted on 2006-05-12 at 14:11:44ID: 16671313

>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.example.com example.com axfr

Which effectively downloads the zone as if you were a secondary nameserver.

Cheers,
-Jon

 

by: ahoffmannPosted on 2006-05-13 at 12:32:11ID: 16675002

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

 

by: ravenplPosted on 2006-05-13 at 12:34:16ID: 16675008

OK, now I'm feeling ignored (see my very first comment).

 

by: ahoffmannPosted on 2006-05-13 at 13:12:09ID: 16675116

oops, host is a valid solution on some Unix' too

 

by: The--CaptainPosted on 2006-05-14 at 02:10:33ID: 16677051

yup, raven deserves some serious credit here (I was not aware of such a usage for the 'host' command - it still seems overly verbose compared to the similar dig command).

My apologies to raven,
-Jon

 

by: JustUNIXPosted on 2006-08-04 at 05:41:23ID: 17249452

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 (make sure to use your closest mirror).

 

by: The--CaptainPosted on 2006-08-05 at 00:16:03ID: 17254980

JustUNIX - thanks for duplicating my advice without giving credit.

Cheers,
-Jon

 

by: JustUNIXPosted on 2006-08-07 at 00:07:41ID: 17261774

Sorry Jon,

I've not seen you posting (maybe, I was too much in a hurry that day :-(    )
You're right, the only difference ist, that you also specified a specific name server and I did not.

I apologize!

Cheers,
Hanno

 

by: ravenplPosted on 2006-10-04 at 23:42:37ID: 17666321

I think I addressed two major things in my very first comment: Usually You can't, and if You can host -a -l will do.

 

by: ahoffmannPosted on 2006-10-05 at 00:30:15ID: 17666486

agreed, ravenpl said it all in his first suggestion

 

by: The--CaptainPosted on 2006-10-06 at 01:38:06ID: 17674771

agreed

 

by: gheistPosted on 2006-10-09 at 08:05:42ID: 17691042

I agree that first answer answers everything others just sched some light on non-impostant detail.

 

by: JustUNIXPosted on 2006-10-17 at 03:36:35ID: 17746262

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

 

by: VenabiliPosted on 2006-10-17 at 03:44:46ID: 17746297

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.

 

by: ahoffmannPosted on 2006-10-17 at 05:27:27ID: 17746895

> Where you had been last 2 weeks ..
hey, Venabili sometimes there's more to do than EE :-))

nslookup is the most reliable suggestion 'cause available on all platforms (at least I don't know any which misses ls command there, including M$), but host is available on most modern platforms too.

 

by: ravenplPosted on 2006-10-17 at 05:33:22ID: 17746935

JustUNIX is little right in fact: nslookup is dropped from modern OSes. In fact same for host. Dig replaces both of them - but on the other hand dig is rather new tool and not available on older systems.
Split between those who first mentioned each of those commands.

 

by: VenabiliPosted on 2006-10-17 at 06:26:31ID: 17747380

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

 

by: JustUNIXPosted on 2006-10-17 at 06:38:39ID: 17747485

As you see before, I did never say I deserve points for answering -- as three others contributed earlier.

 

by: ahoffmannPosted on 2006-10-17 at 06:51:57ID: 17747580

most of the thread goes about "who's right" or "who was first" and no experts insist on being the most correct, as usual ...
Venabili, you got all the information, make your descission.
If totally unsure, ask the PE here, who will vote for a split now, I'm pretty sure ;-)

 

by: The--CaptainPosted on 2006-10-17 at 13:27:45ID: 17751823

>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

 

by: VenabiliPosted on 2006-10-18 at 03:50:47ID: 17755566

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?

 

by: JustUNIXPosted on 2006-10-18 at 04:00:54ID: 17755612

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.

 

by: The--CaptainPosted on 2007-01-25 at 16:03:07ID: 18400809

I agree - pts to raven

Cheers,
-Jon

 

by: percunoPosted on 2009-11-05 at 11:50:58ID: 25753208

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.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...