<p>I understand how I can change the <code>dns</code> settings for my domains by editing my bind configs, when I run my own name-servers. I know that I can define the name-servers with my registrar via their online control panels. But I have no idea how that part works...</p>

<p>How does my registrar store the data about the name-servers? Is it something clever, like them having the authority to store NS records in the root name-servers?</p>

<p>I'm confused by this part, can anyone explain?</p>

[{'answer_id': 46313, 'author': 'Adam Davis', 'author_id': 2915, 'author_profile': 'https://Stackoverflow.com/users/2915', 'pm_score': 3, 'selected': True, 'text': '<p>The registrar is responsible for setting the Root DNS entry that says, "When someone asks for stackoverflow.com, tell them that the authoritative DNS is xxx.xxx.xxx.xxx".  They have an interface that allows them to make changes to the records they own.</p>\n\n<p>Then the requester must go to the authoritative DNS (Which is the one you specified to your registrar was your DNS) to find the IP for stackoverflow.com, any subdomain of it, email server, and other DNS records pertaining to that domain.</p>\n\n<p>-Adam</p>\n'}, {'answer_id': 46321, 'author': 'mercutio', 'author_id': 1951, 'author_profile': 'https://Stackoverflow.com/users/1951', 'pm_score': 2, 'selected': False, 'text': "<p>I've just been shown this:</p>\n\n<pre><code># dig +trace ns stackoverflow.com \n\n; &lt;&lt;&gt;&gt; DiG 9.2.4 &lt;&lt;&gt;&gt; +trace ns stackoverflow.com\n;; global options:  printcmd\n.                       269431  IN      NS      B.ROOT-SERVERS.NET.\n.                       269431  IN      NS      C.ROOT-SERVERS.NET.\n.                       269431  IN      NS      D.ROOT-SERVERS.NET.\n.                       269431  IN      NS      E.ROOT-SERVERS.NET.\n.                       269431  IN      NS      F.ROOT-SERVERS.NET.\n.                       269431  IN      NS      G.ROOT-SERVERS.NET.\n.                       269431  IN      NS      H.ROOT-SERVERS.NET.\n.                       269431  IN      NS      I.ROOT-SERVERS.NET.\n.                       269431  IN      NS      J.ROOT-SERVERS.NET.\n.                       269431  IN      NS      K.ROOT-SERVERS.NET.\n.                       269431  IN      NS      L.ROOT-SERVERS.NET.\n.                       269431  IN      NS      M.ROOT-SERVERS.NET.\n.                       269431  IN      NS      A.ROOT-SERVERS.NET.\n;; Received 504 bytes from 83.138.151.80#53(83.138.151.80) in 3 ms\n\ncom.                    172800  IN      NS      A.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      B.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      C.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      D.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      E.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      F.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      G.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      H.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      I.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      J.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      K.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      L.GTLD-SERVERS.NET.\ncom.                    172800  IN      NS      M.GTLD-SERVERS.NET.\n;; Received 495 bytes from 192.228.79.201#53(B.ROOT-SERVERS.NET) in 145 ms\n\nstackoverflow.com.      172800  IN      NS      ns51.domaincontrol.com.\nstackoverflow.com.      172800  IN      NS      ns52.domaincontrol.com.\n;; Received 119 bytes from 192.5.6.30#53(A.GTLD-SERVERS.NET) in 156 ms\n</code></pre>\n\n<p>Does this tell me that the stackoverflow.com nameservers have been stored in the .com name servers?</p>\n\n<p>Or is it just that they happen to be there now?</p>\n"}, {'answer_id': 46328, 'author': 'Nic Wise', 'author_id': 2947, 'author_profile': 'https://Stackoverflow.com/users/2947', 'pm_score': 1, 'selected': False, 'text': '<p>Sorry I can\'t help toooooo much, but go to <a href="http://twit.tv" rel="nofollow noreferrer">http://twit.tv</a>, and find the Security Now podcast - they did one a couple of weeks ago on DNS - get the first one. It has a good explanation of how it works etc (which may help).</p>\n\n<p>The second one on that site is about how it\'s been "hacked" - the first one is the how it works.</p>\n\n<p>To kinda answer it:</p>\n\n<p>The "root servers" (for .com for eg) hold a record for stackoverflow.com. But they can\'t hold all the details, so they have an NS record (name server record) saying "if you want more info, go look over there". So your machine asks that target machine (ns1.stackoverflow.com) for www.stackoverflow.com, and gets back the A record (IP address), or MX (mail etc)</p>\n\n<p>So, your domain register will store it in a database or whatever they chose, and when you do an update, they SOMEHOW (I dont know, but I guess it\'s published by NIC, but they DO have to pay to be a registrar, and be checked out etc) push that change to the (cluster of) root name servers. They would then push the changes for your domain (eg where www goes, where your mail goes etc) to their local server, which actually serves the domain info.</p>\n\n<p>Hope that makes SOME sense :)</p>\n\n<blockquote>\n  <p>Does this tell me that the\n  stackoverflow.com nameservers have\n  been stored in the .com name servers?</p>\n</blockquote>\n\n<p>Yes and no.</p>\n\n<p>Its like you going calling directory assistance for everything ending in .com. You ask for stackoverflow - they tell you "if you want SO, call this number, and they can tell you how to get Jeff (www), Joel (mail), etc.".</p>\n\n<p>The root server is the first directory assistance. Your register\'s name server is the one on the end of the second call (assuming you called it :) ) </p>\n'}, {'answer_id': 46353, 'author': 'Mark Witczak', 'author_id': 1536194, 'author_profile': 'https://Stackoverflow.com/users/1536194', 'pm_score': 2, 'selected': False, 'text': '<p>It may be helpful to understand the difference between a "registrar" and a "registry" to begin with. A registrar is a company that sells domain names (ie. godaddy) to buyers. Anyone can be a registrar. You can become a registrar. </p>\n\n<p>A registry is an entity (chosen by ICANN) that maintains the master database of domain names. There are several registries out there. The Internet Society (ISOC) is the registry for all .org names, Verisign is the registry for all .com and .net domain names. There are others and each country has one for their domain. All the registrars access and update the registry databases.</p>\n\n<p>A registry is responsible for maintaining the top level domain (TLD) which is the ultimate DNS server. A request to resolve a domain name, if it can\'t be resolved by any other DNS server will filter up to the TLD. Think of it as a hierarchy like a tree where the TLD is the trunk. At that point it will be resolved into an IP address or an error will be returned.</p>\n'}, {'answer_id': 82678, 'author': 'bortzmeyer', 'author_id': 15625, 'author_profile': 'https://Stackoverflow.com/users/15625', 'pm_score': 1, 'selected': False, 'text': '<p>There are some mistakes in the answers so far (and I have not yet sufficient reputation to comment on them).</p>\n\n<ol>\n<li><p>The ".com" name servers are in no way related with the root name servers. When you change the name servers of stackoverflow.com, through your registrar, the change is made in the ".com" name servers. Root name servers are unaffected.</p></li>\n<li><p>It is not true that the registries are all chosen by ICANN. The ccTLD registries (country-code TLD like ".jp" or ".ca"), for instance, are chosen locally, by a process which depends on the country.</p></li>\n<li><p>Not all TLD use a registry/registrar system.</p></li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/46305', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1951/']