Each domain name needs 2 Name Servers to be listed so that anyone who's trying to visit that domain name, knows where to look. This is entered at the domain registrar where the domain is purchased. This can only be done by the person/company that has purchased the domain name or those authorized to make changes to the domain name on behalf of the owner of that domain name.
If you do a WHOIS on yahoo.com, you'll see the following:
Quote:
Domain servers in listed order:
ns4.yahoo.com
ns2.yahoo.com
ns3.yahoo.com
ns1.yahoo.com
ns5.yahoo.com
|
Those are Yahoo's DNS servers. If I type "www.yahoo.com" into my browser, my computer asked my ISP's DNS server for the IP to
www.yahoo.com. If my ISP's DNS doesn't know (i.e. it's not cached), it checks the root DNS servers and asks for the authoritative DNS server for yahoo.com. The root DNS servers return one or more of the ones listed above such as ns1.yahoo.com. My ISP's DNS server then asks ns1.yahoo.com for the IP address which is then provided to my computer and I'm able to load the website.
This is a very simplified version of what really happens. I would strongly recommend that you do some research on DNS before you start your own DNS server. There is a lot that needs to be taken into account if you want to offer a public DNS server. And you can't just arbitarily set up a DNS server that will take over for yahoo.com or any other domain name. It will only do so for domain names that you've been given permission to handle.