Hello I've a question because i'm not sure about something. When I perform whois on domain.com I get something like :
Domain servers in listed order :
ns1.domain.com
ns2.domain.com
The IP from ns1.domain.com is 'hard coded' in the registrar. My question is when I do a host on ns1.domain.com, I retrieve the IP from registrar or from my DNS server ?
Thanks, I hope it's not too confused.
Your question isn't really about registrars, it's about the DNS system and how it works.
DNS can be quite difficult to understand when you start getting into the pointy end of it (GLUE records, etc).
When you purchase a domain, and you enter your nameservers, whatever you enter are created as what's called "GLUE" records. These records are, in laymans terms, "hard coded" in the registrar, as you have said (well, they're not hard coded, but that's the best way to describe it).
And the reason for this is, that when you go to
www.example.com
, and the nameserver isns1.example.com
, how the hell does it know how to find the nameserver, when the nameserver has the same damn IP domain as the website? The GLUE records, thats how.When you look up
ns1.domain.com
,ns1
is a subdomain ofdomain.com
, so it looks at thedomain.com
DNS to find out which IP address to map to (by going back to the GLUE record that the registrar fordomain.com
has listed).In short, ALL records you are looking at come from a DNS somewhere on the internet. Maybe it's a root server, maybe it's an authoritive server, but it's still a DNS server, not a registrar.
My answer to this other DNS question may prove enlightening for you as to how DNS works.
"host" uses only DNS. The TLDs get their basic config from the registry, so in theory they should be the same, but DNS is the actual authority on what is true for applications.