HOWTO: Setup Your Own DNS Name Server in VPS/Dedicated Server with DirectAdmin

 

Hosting and running your own name server is easy to configure if you have VPS or Dedicated server. Wouldnt it be very professional if your domain nameservers same as domain name, rather than pointing nameservers to other web hosts. Example if you have domain name www.yourdomain.com and you want set name servers like ns1.your domain.com and ns2.yourdomain.com

If you have have DirectAdmin or Cpanel a server control panel, things would prove still move easy if you are a beginner.

In this tutorial i would deal with DirectAdmin and will help you setup your nameserver step by step. First of all you will need a dedicated or vps plan with atleast 256 mb of RAM and directadmin running. I recommend you have atleast 2 IP address assigned to you as otherwise it wont be possible to run DNS nameservers. Although it is very much possible to run dns nameserver with 1 IP, most domain registrars dont allow nameservers with one ip. Most hosts would charge about $2 per month for single IP.

Steps

1. First decide whether you want your own nameservers like (ns1.domain.com) or you want to point your domain to your host (like ns1.yourwebhost.com). Either would be fine but if you want to look professional run your own dns name servers. Before you go any further go to ip management and make sure that you have 2 IPs available.

2. Login to DirectAdmin control panel and go to user level, select domain management area and add a domain. Enter just yourdomain.com there and you will get confirmation that domain had already been setup.

3. Now just name server part remaining. Go to Reseller level select name server management. Just select 2 IPs and create name server with the domain you have already created in step 1. Now your name servers will be ns1.yourdomain.com and ns2.yourdomain.com

4. All you need to do is just go to your domain registrar (like GoDadddy) and enter the nameservers there.

One would expect that everything would work fine. Guess What! It didnt. Whenever i tried to enter the name servers in my domain registrar (GoDaddy) i always got ERROR DETECTED. It took me hours of search on web and i missed this small tip somewhere.

Remember: Simply creating and running a nameserver will NOT work. You have to register your name server with your domain registrar. Only then your DNS entry will be accepted.

5. Register your name server with your domain registrar. If you are using GoDaddy, go to Domain Details > Domain summary > View/modify there you have to register your name servers along with 2 IPs. Enter ns1.yourdomain.com, ns2.yourdomain.com along with 2 ip addresses we have used for our name server.

6. Once you have registered your dns name servers, now update your custom name servers which i will be accepted without any errors. It should be accepted without any errors.

Thats it!