Ok, I've searched for the past 6 hours and can't figure this out.

I have several domains, in shared hosing I set the nameserver as ns1.my-hosting-company.com & ns2.my-hosting-company.com

Now I want to setup a VPS so I created a domain my-custom-name-server.com and added glue record to a static IP so :-

ns1.my-custom-name-server.com ==

ns2.my-custom-name-server.com ==

Now I want to use this name server for all my domains

  • example.com
  • example.net
  • example.tld

When I add the nameserver for example.com as ns1.my-custom-name-server.com it isn't working.

The reason for this setup is if I move to a different server I just need to update ns1 & ns2 of my-custom-name-server.com


Finally !!! it worked.. oh the joy when it worked ;-)

This is what got me to the solution.

  • INPUT Port 53 needs to open.
  • I was using bind9 listen-on port 53 in named.conf should have been any

Vanity Server

For professionally managed this is solution I was looking for :-


  • 4
    Why would you want to run your own name servers? Is there some specific reason you need to do this? IMHO it's better to use your domain registrar name servers, or a third party service like Route53 / CloudFlare. In that case you modify your A / CNAME records to use the new IP address. – Tim Mar 31 '17 at 0:59
  • 1
    Agreed. Don't run your own nameservers. – EEAA Mar 31 '17 at 1:09
  • Define "move to a different server". Do you mean move your website? – joeqwerty Mar 31 '17 at 1:09
  • Assuming I want to host 100's of domains and later I want to move to a different hosting would I need to update 100's of A records? – Samosa Mar 31 '17 at 1:11
  • 2
    Check out this project, written and open-sourced by the team that runs all of the stack exchange sites. Once in use, it makes it absolutely trivial to change DNS providers. github.com/StackExchange/dnscontrol – EEAA Mar 31 '17 at 1:36

From the comments, you may have abandoned this approach, but the reason for the error is probably that you have not defined my-custom-name-server.com on your nameserver or it doesn't have A/AAAA and NS records for ns1 and ns2.

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.