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?

  • I may not be correct but I think first you need a top level IP(other than 192.168.*.*) with a server(apache or any) running on it. Then you need to buy a domain and point its DNS A record to that IP you have.
    – sarath
    Commented Jan 30, 2017 at 10:34

6 Answers 6


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).

  • 1
    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. Commented Jan 10, 2014 at 20:25
  • 7
    @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
    Commented Jan 10, 2014 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
    Commented Jan 10, 2014 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
    Commented Jan 10, 2014 at 20:31
  • 1
    @Potenza So yes, you can propagate your own DNS servers to the TLDs instead of using your registrars'.
    – GomoX
    Commented Jan 10, 2014 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.

  • 1
    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. Commented Jan 10, 2014 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
    Commented Jan 10, 2014 at 21:48
  • Not to mention that DNS servers are the current favorite attack vector for DDoS. Ah, well
    – jlehtinen
    Commented Jan 10, 2014 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. Commented Jan 12, 2014 at 17:20

I a company some years ago we choosed to follow this way, to host our authoritative dns server.

To do so, we needed to buy a domain from someone that can allow use to CHANGE the nameserver addresses related to our domain.

We find NTChosting.

We created a bind9 system composed of 2+2 dns server. This allowed use to do 'on the fly' a lot of things that a LOT o providers do not allow to do using their web interface. First of all, we wre able to serve a dynamic dns.

We received 11 DDOS and about 200-250 DOS in less that 6 months.

Yes, we survived, but, no, we do not hold them no more.

I suggest to find some registrar that allow a LOT of free to you, but, I suggest to avoid it.

  • I can't get any registrars to accept domain name servers that the TLD (Verisign in the case of .com addresses) don't recognise. How did you get around this problem? (I appreciate this post was five years ago!) Commented Aug 30, 2023 at 11:17

As realtebo already stated, you need to update the NS (nameserver) DNS records to point towards your DNS severs. I've already seen many registrars that allow to change the nameserver records for the domains. This is also a typical way when integrating with route53, cloudflare, or other DNS related services.

For testing you can setup a DNS server for e.g. myzone.domain.tld, and add NS records at your registrar for myzone to point at your DNS servers. Then use some DNS server (e.g. bind9, powerdns, ...) to start managing the zone(s) myzone and all related sub-zones. You can even redirect DNS again to other servers below your myzone using other NS records. Your myzone servers need SOA records for myzone.domain.tld.

And you will need at least two DNS servers, as this will be required by most registrars to allow changing the NS entries. Typically the two servera are setup as master/slave with automatic zone updates.


You can always just use your DNS address on any device you plan to use the with site. Go into your devices internet settings and locate the DNS settings. Many downloadable apps allow you to do this, then set the DNS on the device to same as server DNS on the PC. When you're finished, visit the server address on the device example : localhost://8888


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.

  • 3
    No that is web hosting, not DNS hosting. Commented Jan 10, 2014 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
    Commented Jan 10, 2014 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .