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

I host my own multiple Websites on my server. How do i setup my own child nameserver?

There are 4 different websites, with .com and .net and .ro at the end. I moved them to my own server.

My Domain Administration (Registrar) let's me define my own child nameserver with my own IP and i've added my nameserver as my domain nameservers list. as the first and only in the nameservers list with my own IP address as the child nameserver

I've setup everything and it works (kind of). When i use my ns IP adress directly i can of course access everything. Using "normal" external dnses will not work. As expected others on the web can't resolve correctly.

What's wrong? Am i missing something?

share|improve this question
up vote 0 down vote accepted

In order for DNS to work properly world-wide the name-server specified in the SOA record and any NS records for a domain has to be on public IP addresses and reachable by the general Internet. Additionally, if you're using nameserver names within the domain you're setting (such as you're doing) glue records have to be entered in the parent registry's DNS.

; Your domain config
ns1   A

; Parent domain config (   A

You don't have to do this if the nameserver you configure is NOT in your domain. This is easier to deal with, and you don't have to make sure your parent domain's glue records are updated.

; Your domain config

And finally, if you have a few hosts, it is entirely possible to define your subdomain records as A records in your parent domain's DNS if such is allowed.   A
share|improve this answer
I am on a public static IP. The server is also my ns1 machine. Can i have that an alias ns1 point to server or do i REALLY need that A record to point to an IP address? – unmircea Dec 30 '10 at 8:57
@basilmir It is quite allowed to have many A records point to one IP address. However, there can be only one PTR record for the IP address. – sysadmin1138 Dec 30 '10 at 15:10
I understand... logical. If a reverse query is performed, the "system" wouldn't know which to choose. – unmircea Dec 30 '10 at 22:18

If you are just doing web sites consider just defining using your registrar's servers. For simple configurations, this is the simplest option.

If your IP address is not static, you will need to use a dynamic DNS service for one of your names. Use CNAME definitions yo point all your other names to the one handled by the dynamic DNS service.

If you have a static address and don't want to use your registrar's servers, you will need to learn how to configure and secure a nameserver like bind. This would likely include a split configuration for inside your network and outside your network. You should also arrange for at least one backup nameserver.

For inside your own network it is common to require different IP addresses than are visible from the Internet. For this to work you need to use your own DNS servers on your network. On Linux systems I use DNSmasq to supply local addresses from cache, and external address from the Internet DNS. I also run a split bind configuration which serves only my domains to the Internet, and acts as a caching nameserver for my DMZ.

share|improve this answer

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.