1

Let's say I want to host my own public DNS for my domain name instead of using the default name servers provided by my registrar.

I spin up two cloud servers, each in different data centers for redundancy. We call one dc1dns01 and the other dc2dns02. If I run hostname -f, I get:

 Host 1: 
 dc1dns01.example.com

 Host 2:
 dc2dns02.example.com

I go to my registrations website, and register my name servers in their portal. I basically say I want ns1 (dc1dns01) and ns2 (dc2dns02) to be name servers and here are the IP's.

I go into the forward zone config and add:

@   IN  NS  ns1.example.com
ns1 IN  A   a.b.c.d
@   IN  NS  ns2.example.com
ns2 IN  A   a.b.c.d

Is this proper? Do I have to add an additional line in /etc/hosts? i.e.

 a.b.c.d dc1dns01.example.com dc1dns01
 a.b.c.d ns1.example.com ns1

1 Answer 1

2

I believe that this is proper. The DNS environment is complete within itself and will only serve answers that come from the DNS database, not from an internal host name. A server can host multiple zones and not live in any of them.

I would caution against providing only two name servers that are both in your domain example.com. It is easy to enter scenarios where no-one can find any of your name servers (glue records are designed to reduce this risk). One of your name servers could be in a different domain (for instance ns1.example.net).

2
  • I'm assuming name.com provides the "glue records". They call it "register your name server" which I guess provides that reference. Since they use records within the same domain themselves, I don't know how much this would help, if any of what you suggested.
    – tchme414
    Commented Aug 9, 2015 at 0:07
  • Not all registrars handle glue records correctly.
    – Daniel K
    Commented Aug 9, 2015 at 0:29

You must log in to answer this question.

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