Find A, Cname, MX Records for Domain?

Is there an easy (and free) way to find all the DNS records for a domain name?

We have a client who is unhappy with their current web host… we have setup hosting and email for them (hosting through us, email through Google Apps for Businesses).

We are ready to move them, but in order to make the move more transparent, we need to find all the DNS records, set them up in our DNS and set the MX record to the old server (so they don’t lose any mail). Then we’ll move the DNS, and after it propagates, we’ll just change the MX record which will only have a 5 minute TTL.

The process works great, we’ve done it before… but we don’t know all their domain name records.

I’ve used but they’ve gone to a paid model, so I can’t get the report unless I sign up for a trial account ($79 a year if you don’t cancel in time).

If you know of an easier way to get the records, you would save me a lot of hassle!


If you have access to a linux box, you can use

host -a domain_name

to display all the visible infos:

host -a
Trying ""
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51075
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2

;                 IN      ANY

[B];; ANSWER SECTION:          172800  IN      NS          172800  IN      NS[/B]

;; AUTHORITY SECTION:          172800  IN      NS          172800  IN      NS

;; ADDITIONAL SECTION:       432     IN      A      432     IN      A

Received 136 bytes from in 180 ms

The “answer” section is what you seek. It’s the server that have answered our request.

Otherwise, usually when you do an

whois domain_name

, you can get the DNS servers too


Whois Server Version 2.0
.... snippity .... snippity.... snippity....
Name Servers:

Creation date: 04 Oct 1999 12:23:14
Expiration date: 04 Oct 2010 12:23:14

Thanks, but that’s still only giving me nameserver information. I’m looking specifically for Cname, MX, A and other DNS records that are setup AT the nameservers.

Any other ideas?

For the mx, it’s easy, as it’s publicly available.

$>host -t mx mail is handled by 10

On the other hand, for the C and A records, you have to know them.
You cannot ask for a list of them, only check if a given subdomain has been declared.

But I don’t get it…
Don’t you have a mean to see what the zone definition is, on the host server ?
Usually, the customer is able to make the changes he want via an management console.

If you don’t have such a control panel, then you are out of luck.
As far as I know, you could have your server declared as a slave for the given zone, but this has to be configured on the master server.
And a zone transfert can only be done once this setup has been done.

Couldn’t you simply put a new zone, with the known subdomains, mx and new dns and add a catch-all that would redirect to the main subdomain (like www) ?
If you cannot ask the current hoster for help, then there is little room for improvements.

Thanks, the MX records are the main thing… that helps a lot.

The customer doesn’t have any kind of management console… it’s a shared hosting account. If they have a control panel, they don’t know how to login.

They’re afraid the current host will just turn their site off or hold them hostage if they mention moving. They rely on email communication, so we want to make sure we get the email switched successfully before making any mention of them moving.


it’s a shared hosting account. If they have a control panel, they don’t know how to login

Ok, it’s explain a lot.
Usually, on what I’ve seen both from my sysadmin and web dev experience, there is usually a A record on the www.domain.extension, and a C record to the A.
So I think you can be pretty sure that you won’t loose anything/much in the process, as you already know how to handle the mx redefinition.

Maybe this place might help, link?

Yes, that is very helpful! Shows MX and A records. :slight_smile: