• Guest, The rules for the P & N subforum have been updated to prohibit "ad hominem" or personal attacks against other posters. See the full details in the post "Politics and News Rules & Guidelines."

Is this correct? Multiple DNS records for same host

serpretetsky

Senior member
Jan 7, 2012
625
19
81
I'm looking at someone else's DNS setup and it I'm wondering if this makes sense:

Type / Host / Value

A record / example.com / 12.34.56.78
NSrecord / example.com / ns1.somewhere.com
NSrecord / example.com / ns2.somewhere.com

I replaced domain names and ip address to hide the information. My question is does it make sense to have both A records and NS records for the same host? Right now it appears like the a record is ignored, and ns1 or ns2 is being used instead.

Also, is it normal to refer to the base domain by the full domain name in DNS settings? I'm not used to seeing example.com, I'm used to seeing "@".
 

John Connor

Lifer
Nov 30, 2012
22,840
613
121
The NS is for the DNS zone for the authoritative name servers, while the A record is for mapping host names to an IPv4 IP address. AAAA would map to an IPv6 address.

I have at least 7 records including a TXT record in CloudFlare for my site. AAAA, A, CNAME, MX, etc, etc.
 

serpretetsky

Senior member
Jan 7, 2012
625
19
81
yeah, having various records like aaaa, a, cname, etc for a single host makes sense to me. The NS record doesn't. Aren't I essentially saying " 'example.com' records are at ns1.somewhere.com, go there to find them" and simulatenously saying, "oh, by the way I have the A record here" ? Is there any reason a DNS request wouldn't go to ns1.somewhere.com and ask that server for the A record?

Just to clarify my domain registrar is Verio. Verio has example.com nameservers pointed to namecheaps freeDNS service ( freedns1.registrar-servers.com and freedns2.registrar-servers.com). In namecheap I have a bunch of records (cname, A, mx). Mixed in with all of the records are two NS records that say
example.com ns1.yourhostingaccount.com
example.com ns2.yourhostingaccount.com
this doesn't sound unreasonable?
 

John Connor

Lifer
Nov 30, 2012
22,840
613
121
You have to understand. You have a DNS server and then the host server of which your site sits. So the A record is pointing to your host to let users vist your site, but that DNS query is tossed to the name server to retrieve the address. DNS NS is the middleman if this doesn't make any sense I guess.
 

serpretetsky

Senior member
Jan 7, 2012
625
19
81
Hmm, unfortunately I still don't get it. Let's go through the process maybe that will help me better. Pretend my website server is sitting at 12.34.56.78. I have an A record that says "@ 12.34.56.78" at namecheap. I also have an NS record that says "@ ns1.yourhostingaccount.com" at namecheap. I'm going to ignore caching that might occur at various stages of this process unless it's important for some reason.
====================================================================
1) Browser wants to go to example.com. It sends request to my preferred DNS server for an ip address for example.com. Let's pretend my preferred DNS server is google 8.8.8.8

2) 8.8.8.8 requests root servers for ip address of TLD servers. Root servers give TLD servers ip address

3) 8.8.8.8 requests TLD servers for nameserver of example.com. TLD servers give freedns1.registrar-servers.com and its ip address

4) 8.8.8.8 requests freedns1.registrar-servers.com for ip address of example.com.

5) This is where I'm lost I see two possibilies with my current config
5a) freedns1.registrar-servers.com gives ns1.yourhostingaccount.com and its ipaddress, since that is the NS record for example.com. 8.8.8.8 then needs to follow up with ns1.yourhostingacount.com to figure out example.com's A record. I could, potentially, have a different A record there then at namecheaps nameservers
5b) freedns1.registrar-servers.com gives back the A record of 12.34.56.78 that it has.​
 

ASK THE COMMUNITY