Can a single-ip server be a domains host AND nameserver

domain-name-system

My server has one IP assigned to it. It is running as a DNS server, but no domains are pointing at it – nothing is using it for DNS right now. I have a domain which I want to host on this server.

Can I have my server providing the DNS for the domain, as well as the hosting?

So can I have one server:

91.101.8.107

One domain:

furnace.com

And set these nameservers for the domain at my registrar:

ns1.furnace.com
ns2.furnace.com

… I can't think how this would work. Surely I need a separate server with its own DNS to act as the nameserver? Then my server can only act as the nameserver for other domains, but not the nameserver for furnace.com ..?

(FYI: those are not the real domain or IP)

Best Answer

It will work because of glue records - in addition to the NS records, the com zone would also contain A records for ns1.furnace.com and ns2.furnace.com

Example (xname.org provides free DNS hosting, hope they don't mind using them here):

$ dig any  +norecurse xname.org @D0.ORG.AFILIAS-NST.org.
; <<>> DiG 9.5.1-P2 <<>> any +norecurse xname.org @D0.ORG.AFILIAS-NST.org.
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28941
;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 3

;; QUESTION SECTION:
;xname.org.         IN  ANY

;; AUTHORITY SECTION:
xname.org.      86400   IN  NS  ns0.xname.org.
xname.org.      86400   IN  NS  ns2.xname.org.
xname.org.      86400   IN  NS  ns1.xname.org.
xname.org.      86400   IN  NS  ns3.xtremeweb.de.

;; ADDITIONAL SECTION:
ns0.xname.org.      86400   IN  A   195.234.42.1
ns1.xname.org.      86400   IN  A   87.98.164.164
ns2.xname.org.      86400   IN  A   88.191.64.64

;; Query time: 42 msec
;; SERVER: 199.19.57.1#53(199.19.57.1)
;; WHEN: Thu Jun  4 22:15:27 2009
;; MSG SIZE  rcvd: 159

ns3.xtremeweb.de is not in the xname.org zone and thus needs no glue record here.

Related Topic