Looking at the fundamental DNS settings for a website

Networking, connecting to the internet, wi-fi and home entertainment
User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Looking at the fundamental DNS settings for a website

Post by John Gray »

I'm beginning to think that the most fundamental law in the universe is not that of Gravity, or any of the Theories of Relativity, and so on, but...
The Law of Unintended Consequences.

Having had our website's MX records (and our incoming email) stuffed comprehensively by a web host 'error', the changes they made to correct this will propagate across all the DNS servers in the known universe, and take up to 24 hours to reach a "steady state". Until then, the information provided, say, by http://www.intodns.com must be regarded as perhaps transitional.

So my question is: does anyone know of a tool which could be pointed at the web host's authoritative DNS server, the one from which the corrected data is being sent, so that it would be possible immediately to check on what is being sent out?

(I am aware that another way of achieving the same objective would be to look at the appropriate CPanel (or similar utility) on the web host.)
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
StuartR
Administrator
Posts: 12604
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Looking at the fundamental DNS settings for a website

Post by StuartR »

Do you know the name, or IP address, of the DNS Server you want to check? If so then...

NSLOOKUP
SERVER dnshost.whatever.com
webhost.whatever
QUIT
StuartR


User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Looking at the fundamental DNS settings for a website

Post by John Gray »

Thanks, Stuart

I assume that the "DNS Server" is what WHOIS describes as the "name server" (of which there are usually two), This works OK.
But when I put the domain name (which is what I presume you mean by "webhost.whatever") I just get

Server: <name server as entered>
Address: <IP address of name server>

Name: <my domain name, as entered>
Address: <IP address of domain's website>

and no DNS records. What am I doing wrong?
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Looking at the fundamental DNS settings for a website

Post by John Gray »

I think I've sussed it. NSLOOKUP is one of the programs which gives the Command Line a bad name, since the documentation is both cryptic and difficult to find!

NSLOOKUP
SERVER <OneOfTheWebHost'sNameServers>
LS -d <my.domain.name>
EXIT

Now to see if I get this to work in a BATch file...
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
StuartR
Administrator
Posts: 12604
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Looking at the fundamental DNS settings for a website

Post by StuartR »

Thanks for the update. Sorry for not responding yesterday, I was travelling.

Let us know how this works for you.
StuartR


User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Looking at the fundamental DNS settings for a website

Post by John Gray »

Here are three methods of doing what I want to do - the final one is the cleanest.
To get it to work in your environment
* replace WebHostNameServer with one of your web host's name servers, probably looking like ns2.webhost.com
* replace MyDomainName with the domain name of your website on the web host, probably looking like mydomainname.co.uk

Code: Select all

:: several ways of running NSLOOKUP from the command line or a BATch file

:: intention is to show all the DNS records on (one of) my web host's name servers
::   which relate to my domain's website

:: method A1, using a file of nslookup commands
(echo server WebHostNameServer & echo ls -d MyDomainName) > commands.txt
nslookup < commands.txt
del commands.txt

:: method A2, using a pipe with the same file of lookup commands
(echo server WebHostNameServer & echo ls -d MyDomainName) > commands.txt
type commands.txt | nslookup
del commands.txt

:: method B, with no intermediate file (a clean one-liner!)
(echo server WebHostNameServer & echo ls -d MyDomainName) | nslookup 
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...