My company wants me to setup our own DNS Servers, but i'm running into problem with it. So here's the story:

We bought a domain example.com from marcaria and bought a new VPS located in Russia. Our goal is to setup example.com to use ns1.example.com and ns2.example.com. But we cant do that because our domain still pointing to marcaria NS.

So first i create DNS Server using BIND within our VPS with this tutorial http://linuxgravity.com/configuring-bind9-domain-name-server-on-centos-or-red-hat , and when i try to change my domain DNS server to point ns1.example.com, it says

Address lookup for ns1.example.com failed: Host not found

I know its like chicken and egg problem, but i have no clue for the solution. I saw another thread solution but its godaddy as the domain registrar, it doesnt work for me.



Delegating name service

You must ask your domain registrar, Marcaria, to arrange that the nameservice for example.com be delegated to your nameservers. You'll have to give them the Internet-facing publicly-accessible IP-addresses of those nameservers.

In the case of example.com the delegation is carried out by configuring the nameservers for the .com domain. In your case it may be different but your domain registrar should arrange this for you.

Configuring other computers

Most businesses operate split-DNS where the DNS namespace visible to internal users is separate from that available to outside users. This often means that internally you use a separate nameserver for the example.com domain. Either way, for obvious reasons, you specify the nameserver the computer is to use by the nameserver's IP-address, not it's name.

  • I give the ns1.example.com accessible IP address, its just they lookup for the hostname. I guess i have to contact their support. – mrfhm Nov 12 '10 at 21:14
  • I dont really understand your last paragraph, does it mean i used one IP address as a web server and dns server? – mrfhm Nov 12 '10 at 21:14
  • If you configured BIND on the same VPS you are using for Apache httpd server then yes. – RedGrittyBrick Nov 12 '10 at 21:57

I think that on the current nameservers handling example.com, you must first set up A records ns1.example.com and ns2.example.com in order to delegate NS control of example.com to them. Don't forget to add the same A records to your own bind so that when the change take place, the records still exist.
note: I might be wrong here, I'm not very good with DNS :-)

  • So, what your saying is i need to add A record in marcaria NS and in my bind? hmm..worth to try – mrfhm Nov 12 '10 at 21:15
  • If you intend to run your own nameservers for example.com then Marcaria's nameservers are not involved. How familiar are you with DNS? Is the Wikipedia article of any interest? en.wikipedia.org/wiki/Domain_Name_System – RedGrittyBrick Nov 12 '10 at 22:00
  • "change my domain DNS server to point ns1.example.com, it says Address lookup for ns1.example.com failed: Host not found". <br>Before you can delegate control of example.com to ns1.example.com, ns1.example.com record must exist, therefor start with creating it in the nameservers that are currently controlling example.com (I suppose Marcaria's). – 3molo Nov 13 '10 at 7:28

You want to use a name for your DNS server that is part of your domain. Normally to resolve names from your domain, it is necessary to query your DNS server, but the address or your DNS server is not known to the resolver.

To solve this, you need to provide not only the name but also the IP address of your DNS server. This is called glue records and is exactly to solve this problem. How you can provide the IP addresses depends on the registrar of your domain.

The glue records are stored in the com. domain (in this example). So a DNS query to the com. DNS servers for name.example.com would not only return an NS record pointing to ns1.example.com, it would also contain an authoritative A record for ns1.example.com so that a resolver knows where to continue. Of course, the A record for ns1.example.com in your zone example.com and the glue A record for ns1.example.com should match.


When you have an existing domain example.com (the setup will be slightly different for a domain you are about to create at the same time) and you want to use in-bailiwick nameservers for it, that is nameservers whose name are under the domain name itself, like your ns1.example.com and ns2.example.com, then it means the registry will need to create glue records in its zone, that is A and AAAA records for the nameservers' names because otherwise no resolution could happen at all.

To have that to happen it needs to be done by your registrar. It will also depend on the TLD, because some are using hosts as "objects" and others as "attributes". So in some cases the registrar will mandate you to use a specific procedure, before changing the domain name itself, to register the nameservers at the registry, where you will need to enter their name and IP addresses.

After that the change of nameservers for the domain name should succeed.

Of course, before all of that, ns1.example.com and ns2.example.com should be properly set up with the appropriate zone (containing their own IP addresses because they are in bailiwick), answering from public queries, etc.

You can use a tool such as Zonemaster to try that, it has a mode to test "undelegated domains", that is to test your domain name but not with its current set of nameservers, with the new one you are attempting to use.

As a final advice: glues can create all sorts of problem, I do not think it is a good idea to use them when you start being a DNS administrator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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