I have two Ubuntu Servers (S1 & S2 for example) on two different public IP’s (static & are in different locations). I got a domain name from GoDaddy. Lets call it, example.com.

I have setup Bind on S1 and opened DNS port. I told GoDaddy zone file to direct hostname (example.com) to my Public IP that S1 is on. Then I pinged the domain and got a reply back showing the public IP. This sounds like the correct DNS setup correct?

Now I have another Ubuntu Server with a static public IP address. How can I attach a subdomain such as sub1.example.com to that public IP with Ubuntu Server S2? Would I need Bind on every server, even though it’s one domain name?


No, BIND is not required on every box. You only need BIND (or you can use GoDaddy's name servers to do it) on a single box to do your work.

As far as setting up a subdomain, you'll need to setup a Zone file on your BIND server. Here's a decent site to explain a way to do that:


  • So what you are saying is if I put in the zone file that sub1 points to your public IP on the Server not hosting bind that would work? Would you need to open port 53 onthe server the subdomain points to. Can it be any other port? I know basic networking, I'm just confused because of the client-server model when it comes to this. If I don't install Bind on the Server with subdomain how does it know what service the subdomain is pointing to ? – Benjamin Jones Mar 25 '15 at 15:45
  • Are you saying the subdomain is just refrenced to the IP to the Server? That way any services that are forwarded will see that IP blah blah resolves to sub1.example.com? (This is what i'm thinking) – Benjamin Jones Mar 25 '15 at 15:47
  • The absolutely simplest solution is to have the DNS server which already resolves example.com also serve the subdomain sub1.example.com. You don't have a Bind server of your own anywhere and example.com works fine. If you want to run a DNS server of your own, you still need to make changes on the server which currently serves your DNS records to set that up. – tripleee Mar 26 '15 at 23:08

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.