I am stuck in a bit complicated situation(complicated for me, might not be for you).

What I have:

I have 2 virtual private servers on two different IPs eg.,'s name these vps1 and vps2) and one domain name eg. foo.com.

What I want to produce:

I want to host multiple websites on these two vps eg. on vps1, I want to host one-bar.com, two-bar.com and, on vps2, I want to host three-bar.com, four-bar.com.

What have I done:

I have created 4 glue records with my registrar of foo.com ie. ns1.foo.com, n2.foo.com, ns3.foo.com, ns4.foo.com,

  1. ns1.foo.com and n2.foo.com resolve to IP address of vps1 (
  2. ns2.foo.com and n3.foo.com resolve to IP address of vps2 (

I updated,

  1. nameservers for foo.com, one-bar.com and two-bar.com to ns1.foo.com and n2.foo.com.
  2. and, nameservers for three-bar.com and four-bar.com to ns3.foo.com and n4.foo.com.

I have installed webmin on both vps to manage websites and dns, This is stripped down copy of my zone files,

vps1 and domain foo.com:

@ IN SOA ns1.foo.com. root.ns1.foo.com. ( 1465031833 10800 3600 604800 38400 )
foo.com. IN A
ns1.foo.com. IN A
ns2.foo.com. IN A
ns3.foo.com. IN A
ns4.foo.com. IN A
foo.com. IN NS ns1.foo.com.
foo.com. IN NS ns2.foo.com.

vps1 and domain one-bar.com:

@ IN SOA ns1.foo.com. root.ns1.foo.com. ( 1465031833 10800 3600 604800 38400 )
one-bar.com. IN A
@ IN NS ns1.foo.com.
@ IN NS ns2.foo.com.

vps2 and three-bar.com:

@ IN SOA ns3.foo.com. root.ns3.foo.com. ( 1465031833 10800 3600 604800 38400 )
three-bar.com. IN A
three-bar.com. IN NS ns3.foo.com.
three-bar.com. IN NS ns4.foo.com.

What I am able to produce: Websites on vps1 ie. foo.com, one-bar.com and two-bar.com are resolving properly but, websites on vps2 aren't.

Can anybody help me to find out what am I doing wrong?

PS: Thanks in advance!

  • 1
    A given nameserver can be authoritative for multiple zones (domains). So you do not need 4 nameservers. You can use the same set of 2 for all your domains and just configure them with records for your domains. Also note that if you do not want to handle DNS and nameservers configuration this is probably a service that your registrar/hosting company can deliver for you. Finally, per RFC2606 do not invent domain names when you want examples, just use example.com or example.net Feb 27 '18 at 3:35
  • @PatrickMevzek alright, I will keep that in mind. Mar 8 '18 at 5:53

NS1 is the primary DNS for foo.com. you should add records for all 4 sites, one-bar, two-bar , three-bar and four-bar to both NS1 and NS2. NS2 should act as a redundant DNS server for you.

  • So, you mean I don't need ns3.foo.com, ns4.foo.com even if I want to point three-bar and four-bar to vps2? Feb 26 '18 at 7:45
  • yes. you dont need so many name servers. right now you have two vps running dns. so then you will have two name servers, ns1 and ns2, and they should both have the same records. Feb 26 '18 at 9:26
  • Thank You, It helped. Issue was with the bind server (it was stopped). But, I switched to two name-servers only for ease of maintenance. Mar 8 '18 at 5:58

The issue was a stupid mistake, bind server on vps2 was stopped because of my mistake. It is working now. Thanks to everyone who tried to help.

Pankil make stupid mistakes, don't be like Pankil :p

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.