Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is this recommanded to use single shared name server for different domains hosted on single dedicated server. like using &

or every domain should have its own name server something like &

Which one is recommanded / right approach?

share|improve this question
up vote 2 down vote accepted

You dont need seperate dns servers for every domain. make two master servers like & and and use them in all your domains. that way it is easier to manage the DNS records.

share|improve this answer
does that mean I can use my company's website name server for every other domain I created on the same server? – user57221 Jun 11 '12 at 9:35
Exactly, just point your to DNS server's ip address. – Hex Jun 11 '12 at 9:40

Nameservers, as the name suggests defines the named servers.

Named servers are "NS1.DOMAIN.COM" and "NS2.DOMAIN.COM" minimum, usually they point to a single IP address, although it is recommended that NS1.DOMAIN.COM points to a different static IP address as opposed to NS2.DOMAIN.COM. This is because, in the unlikely event that one of your IP addresses fails to work, the secondary ip address should work.

So, similarly to how telephones work. You want to call your friend, you know your friends mobile number.. but it's easier to remember your friend by a name, rather than the 11 digits. IP addresses and NameServers operate in the same way, it's easier to remember "" or "" than it is their IP addresses.

Therefore, you store NS1.DOMAIN.COM to one of your primary IP address, and NS2.DOMAIN.COM to the secondary IP address. So, when someone punches your domain name in the address bar, that request escalates to a router which knows where to find the DNS record of "NS1.DOMAIN.COM" and translates that to the IP address, then forwards the request (client) to that server.

Additional, virtual hosts, hosted on your server will point to the same DNS records, for example "NS1.DOMAIN.COM", which collects the IP address for that named server.

Your webservice (Apache/nginx) is then responsible for handling the individual requests that are forwarded to your server, which at this point, your DNS is done with.

In short - nameservers are just DNS records which name your server IP addresses, upto 4 unique IP addresses, and they are only defined as fall back, should the first IP/name server fail to respond.

share|improve this answer

I think you are slightly confused. Any one host (IP address, actually) can only run a single name server (instance) because DNS requires use of the well-known ports 53 over TCP and UDP, and the most granularity that can be achieved is binding to the triplet IP address, protocol and port. So the answer to your question is that you need a single name server instance per host, assuming a single IP address per host.

A single name server instance can (in principle; there may be artificial software limitations) serve an arbitrary number of zones (which simply explained is DNS parlace for domains). So there is no reason why a single name server can't serve both and, for instance.

For reliable operation, most registrars require at least two named name servers for a delegation. You can, in principle, use only one, but if that server goes down or becomes unreachable for whatever reason (even for only a part of the Internet), there is no redundancy so all name resolution for the relevant zones will fail. Therefore, it is strongly recommended to use at least two separate hosts as DNS servers in a delegation, preferably situated in different locations (geographically and network-wise) if you can arrange that.

You can point multiple names at the same IP address, a single name at multiple IP addresses, or any combination of these. So if you want to, you can use the name in the delegation, and in the delegation, but point both and to the same IP address (say, This is both possible and reasonably common, but means more work if the IP address of the server changes since it must be updated in multiple places.

share|improve this answer
Whoever downvoted this, would you mind adding a comment explaining what is wrong with the answer? – Michael Kjörling Jun 14 '12 at 11:03

Your Answer


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

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