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

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:

One domain:


And set these nameservers for the domain at my registrar:


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

share|improve this question
You would do well to have a bit of a read about DNS and get at least an overview of the mechanisms involved. Google is your friend. –  John Gardeniers Jul 17 '09 at 8:07
add comment

3 Answers

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

;xname.org. 		IN	ANY

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.

ns0.xname.org.  	86400	IN	A
ns1.xname.org.  	86400	IN	A
ns2.xname.org.  	86400	IN	A

;; Query time: 42 msec
;; 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.

share|improve this answer
glue records are the trick - for clarity "the com zone" = your registrar, who would have an option to add glue records for ns1 and ns2 –  Mark Regensberg Jun 4 '09 at 20:24
add comment

The answer is yes, but with some qualifications.

1- There is no reason a single physical server cannot do both functions. The same type of server software (DNS server, typically BIND), does both.

2- However, you will need an additional system to be your backup nameserver. When you say "hosted", I interpret that as: available to the public via DNS. If so, your registrar will require two nameservers. You do not necessarily need to provision that server yourself, but you do need your DNS domain to be served off of at least two distinct IP addresses (presumably two different systems.)

share|improve this answer
add comment

There is no technical reason why this cannot work. However, the reason why you should have more than one nameserver, is of course that if one server is down, the other one is reachable, so many domain registrars demand that these are not identical.

What you can do, is be your own primary domain service, and find some (free) secondary domain service (like www.everydns.net).

That way, this will work perfectly.

As for the reason why this works in the first place: there is also the 'whois' system, which is used to find the first nameserver. More details can be found in Wikipedia (http://en.wikipedia.org/wiki/Domain_name_system)

share|improve this answer
Whois isn't used when doing DNS lookups. The first name server is found by querying the root nameservers. You can see how this works by using the following command: dig +trace +all <domain> –  Mike Conigliaro Jun 4 '09 at 20:25
-1 because of the mention of whois, which is completely unrelated to "why this works" –  bortzmeyer Jun 5 '09 at 7:09
add comment

Your Answer


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