0

is this recommanded to use single shared name server for different domains hosted on single dedicated server. like using ns0.sharedNameServer.co.uk & ns1.sharedNameServer.co.uk

or every domain should have its own name server something like ns0.domainName.co.uk & ns1.domainName.co.uk.

Which one is recommanded / right approach?

3 Answers 3

2

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

2
  • 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, 2012 at 9:35
  • Exactly, just point your ns1.yourcompany.com to DNS server's ip address.
    – Hex
    Jun 11, 2012 at 9:40
1

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 "facebook.com" or "google.com" 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.

-1

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 example.com and example.org, 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 ns1.example.com in the example.com delegation, and ns1.example.org in the example.org delegation, but point both ns1.example.com and ns1.example.org to the same IP address (say, 192.0.2.123). 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.

1
  • Whoever downvoted this, would you mind adding a comment explaining what is wrong with the answer?
    – user
    Jun 14, 2012 at 11:03

You must log in to answer this question.

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