I am just learning about DNS, so please bear with me and don't hesitate to correct me.

I own my domain example.com --- I have created two linux boxes that I am designating ns1 and ns2 .example.com. And lets say I have two web boxes. web1 and web2. And I have 100 domains out there .. Some hosted on web1 and some on web2 -- This is why I am setting up my own DNS servers, as to give all my clients nsx.example.com no matter how many web servers I have I don't have to give some one IP address, and some another IP address.

My problem is understanding how to point example.com from my registrar to my physical IP addresses for ns1 and ns2. From my understanding, DNS runs on port 53, so a A record will not work. However a CNAME points an alias to a FQDN.

On the registrar level (Which happens to be Godaddy), how do I point ns1 and ns2 .example.com to my physical servers, so that I can give my clients those two Nameservers and not hand them individual IP addresses based on the server they are hosted on?

  • 5
    Unless you have a very good reason for doing so, do not host your own DNS. It's completely unnecessary. There are a number of very competent DNS providers that will do a much better job at this than you possibly can, at a very low cost. – EEAA Feb 10 '17 at 17:07
  • I am open to your suggestion, but I still don't know "how" to go about this. -- I called Godaddy and they don't offer a managed DNS solution. I am building the servers on an enterprise level HA environment, but if the cost is low enough I am not opposed to shelling out a few $. If one were to look for managed DNS with a GUI for easy update etc etc .. Where might one look? – Zak Feb 10 '17 at 17:33
  • 1
    AWS Route53 is my go-to. They offer both a nice GUI as well as full programmatic access to add/change DNS records. GoDaddy does most definitely provide DNS services. I'm not sure why they told you otherwise. For many reasons technical and otherwise, I refuse to do business with them, though, and I'd recommend you consider the same. – EEAA Feb 10 '17 at 17:38
  • Even Namecheap will give you free highly available DNS -- even if you didn't register your domain with them! – Michael Hampton Feb 10 '17 at 18:08
  • See this Godaddy documentation – Barmar Feb 10 '17 at 19:53

Why build out your own DNS infrastructure for external use when highly-resilient services like Route53, EasyDNS and DNS Made Easy are out there for minimal cost? The wording of your question suggests to me that you do not have enough exposure with DNS to roll this out and manage it safely and effectively and with the required near 100% availability. I would highly recommend looking at hosted DNS solutions -- it would only take a simple DDoS on your two name servers to effectively knock all of your client sites offline.

If your goal is to have branded name servers, several DNS providers offer "Vanity DNS" options that will allow you to have nameservers that are branded to your primary domain. Then you can configure your client domains to use your primary domain name servers -- taking advantage of the DNS providers existing highly-available and secured DNS (often with multiple geographic regions and anycast), while still being "fully branded" for your company.

Changing the NS records at your registrar is a fairly simple process, particularly if you're using a DNS provider. For godaddy, details on that process are available on godaddy's support site.

| improve this answer | |

You just let your customers (in the sense: people maintaining domain names for which you are running some web server) use ns1/ns2 as nameservers for their zone (but then you control everything from them, not only their webserver).

And your ns1/ns2 must of course be correctly present in example.com zone with their IP adresses, so that all the resolution works.

| improve this answer | |

To answer your question, they're called DNS "glue records" and are used to specify with a registrar which are the authoritative nameservers for a given domain. GoDaddy will have an option under your domain's DNS settings to use custom name servers. Just specify your custom IPs and you're good to go. When the glue records are changed, the domain WhoIs gets updated and the TLD nameservers will cache the values. Global propagation of new glue records tends to be very fast, but can take up to 48 hours for global propagation.

However, to piggyback off of others, hosting your own publicly facing DNS isn't the best idea. You have to consider everything from availability to security, etc. If you do want to host your own though, I would urge you to harden your system to the CIS Benchmarks at minimum and to use the NSD DNS software, as it is purpose built to be a secure, DNSSEC-ready, authoritative-only nameserver.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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