Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Maybe this comes from my lack of understanding of how DNS fully works, but i want to host a domain on my own set of DNS servers.

That being said, i cannot seem to find a clear way to do this. From what i understand ICANN owns the TLD's (com, org, net, etc...) and licenses other companies to create subdomains. These companies sell these subdomains to the public and usually host them as well. In a nutshell anyways.

I simply want to register a domain and host it on my own servers. I am going to assume ICANN has a set of DNS servers that manage the TLD's, but how do i go about linking my DNS servers into theirs? Essentially i would have to create NS records on ICANN's root servers correct? This is were i am lost, as i don't really know how to do that. Unless i can go into the system of the party i purchased my domain from and set the NS records to my own servers. In that event won't i still be using the third parties DNS servers as a type of relay?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

You would typically use whoever is giving DNS service to your registrar as a middleman, and that's how it's supposed to work. You don't just insert a record into a root DNS server yourself. In general, your registrar gives you DNS hosting for free with your domain as a way of providing additional service, but other than that, they charge you for dealing with the upstream DNS system and getting your domain's record into the TLD's name servers.

You can use DNS tracing tools to figure out the name resolution process for a domain name and get a feel of how it ends up on your server, but DNS being a hierarchical system you can't really host your domain yourself - you need agreement from a higher level DNS server.

Here's a simple web-based tracing tool: http://www.simpledns.com/lookup-dg.aspx

Keep this in mind: when I say "middleman", I mean in the authoritative chain of DNS resolution. Actual DNS queries will pretty much never go to either a root DNS server, your registrar's, or your DNS servers for that matter, as they will be cached downstream. The point up to which recursive resolution is needed only depends on what is cached and what isn't (i.e, if your ISP's DNS server already knows the authoritative name servers for .com, they don't have to go query the root for it).

share|improve this answer
    
I understand the hierarchal system, i know a third party has to insert the record into the root servers. What i want to avoid is having the third parties DNS servers acting as a relay. I want the root servers to say the authoritative DNS server for my domain is my server. –  TriadicTech Jan 10 at 20:25
4  
@Potenza - That's how it actually works. The Registrar DOES NOT act as a "relay". The Registrar is responsible for telling the parent servers (the gTLD servers) what your name servers are. From then on out queries for your domain are directed DIRECTLY to your name servers. –  joeqwerty Jan 10 at 20:29
    
@Potenza That's not possible because you have to go through an authoritative server for your TLD at the very least. Root DNS servers only resolve the root zone and TLDs according to Wikipedia: en.wikipedia.org/wiki/Root_name_server –  GomoX Jan 10 at 20:29
    
@GomoX - The Registrar is only responsible for informing the parent servers of the name servers for the domain. The Registrar has no other bearing on name resolution for the domain. –  joeqwerty Jan 10 at 20:31
1  
@Potenza So yes, you can propagate your own DNS servers to the TLDs instead of using your registrars'. –  GomoX Jan 10 at 20:34

Don't mix up hosting a website with hosting a DNS server. You do NOT have to run a DNS server in order to host a domain.

A domain is simply a pointer to an IP address where a website (or other service) is hosted. Ownership and control of domains is regulated by a set of vetted registrars, who sell domain ownership and maintain the lists of who owns what domain, as well as the settings/configuration associated with each domain. This data is propagated out to other DNS servers, with lower-level DNS servers always treating the registrars as the authoritative source of accurate DNS information.

Now, it is possible to create and run your own DNS servers, but this is equivalent to printing and using your own currency. It is meaningless unless everyone else also adopts your system. :)

To host a website, you just need a server that is accessible via a public IP address. Anyone could type in the IP address into a browser and see your site. Now, to associate this with a domain, you need to purchase the domain from a registrar, and then configure the domain to have your server's IP address as the 'A record' for 'www'. At that point, all a person needs to do is type in www.yourdomain.com and they will be at your server.

share|improve this answer
    
I know i don't HAVE to run my own DNS server, most registrars will offer that service for me. But i want to run my own DNS servers. Instead of a registrar (GoDaddy for example) being the authoritative name server, i want my server to be the authoritative name server. This makes management much simpler from my end. –  TriadicTech Jan 10 at 20:30
    
So, you really want to remove the high availability offered by most DNS providers, and ensure that your own DNS server is the single-point-of-failure for name resolution for your domain. Have fun with that. –  mfinni Jan 10 at 21:48
    
Not to mention that DNS servers are the current favorite attack vector for DDoS. Ah, well –  jlehtinen Jan 10 at 22:05
    
@mfinni - It's not a single point of failure if you have multiple DNS servers on multiple IP's coming out of multiple Internet connections. –  TriadicTech Jan 12 at 17:20

Hosting your own domain on your own servers is very simple. I have been doing it at my website at home since 2006. It involves the following steps.

  1. Buy a domain from the registrar of your choice.
  2. Setup your own server to run a web server (I use a LAMP server).
  3. Use a Dynamic DNS (I use DNSPark) to point the domain name to your external facing IP address. Here I am assuming your ISP allows incoming traffic on port 80. If not then there are some additional steps required.
  4. Create a A record for www for your domain at the DDNS provider and / or your registrar.
  5. Allow incoming traffic on port 80 to reach your own web server on you firewall (Port forwarding).
  6. [Optional] Use a dynamic dns update program like Direct Update to automatically update your external IP on the Dynamic DNS provider. If you don't want to use it, then you will have to make sure that your external IP is correctly updated on the Dynamic DNS provider.

That's it.

share|improve this answer
2  
No that is web hosting, not DNS hosting. –  TriadicTech Jan 10 at 20:27
    
@Potenza: That's true, but as jlehtinen mentioned, it is not necessary, nor is recommended to host your own DNS server. It will definitely not make management easier, but make your domain more susceptible to issues. –  Mukul Jan 10 at 20:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.