1

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)

1
  • 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. Jul 17, 2009 at 8:07

3 Answers 3

5

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.

1
  • 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 Jun 4, 2009 at 20:24
0

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

-2

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)

2
  • 1
    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> Jun 4, 2009 at 20:25
  • -1 because of the mention of whois, which is completely unrelated to "why this works"
    – bortzmeyer
    Jun 5, 2009 at 7:09

You must log in to answer this question.