How-to setup the DNS and name server for a DirectAdmin web server

You have enough of shared hosting and/or the costs for bandwidth are too high? OK, the next step is your own dedicated server, but with a limited budget it’s hard to find a good and cheap managed server.

For all beginning server administrator is this guide about how-to setup the DNS for a server with a DirectAdmin control panel.

Why DirectAdmin (DA)?
I like this control panel at most, it’s fast, frequently updated and there are updates also for the latest PHP and MySQL version. I’m sure there are much more pros and of course there are more powerful control panel systems.

If you buy an unmanaged dedicated server, the operating system and DirectAdmin should be installed. If not, you need to do it by yourself (check the DA website for further information). I guess this is a hard job for a beginner, if you need to start from the beginning try to use Ubuntu, this Linux distribution works great with DirectAdmin.

First of all you need to login to your DirectAdmin control panel, click “IP management” and enter the two IP addresses (we use the IP addresses 12.34.56.78 and 12.34.56.79 for our example) you got from your hosting provider (the first server IP address should be already in the list)

Next from the admin panel, switch to the “User level” and click on “DNS Management”. Enter here the DNS records you need for your domain name / host. Don’t forget you need to enter also the two name server entries (there is a trailing dot (.) behind the value).

To setup the DNS and name servers for your server you need use the domain name you have used in the local DNS setup before. Configure the domain with your “global” DNS (domain) provider as follow (these are the two IP addresses you have configured within DirectAdmin):

ns1.domain.com -> 12.34.56.78
ns2.domain.com -> 12.34.56.79

These name server entries need some time to populate to the internet (up to 24-48 hours).

In the meantime we need to add some more setting to the web server. Login to DirectAdmin and click “Administrator Settings”. Enter a server name within the field “Server’s Hostname”, I used serv01.domain.com. Enter the name server entries you have used before for the fields NS1 and NS2 and leave the DA control panel.

DA admin settings

Now connect to your server via SSH (use Putty). Login as root (sudo) and enter:

nano /etc/hosts

With this command you enter the file “hosts” with the text editor Nano some distro’s may not include Nano in which case you may wish to use Pico or the adventurous Vi, add this row (check the Linux MAN pages how to insert text with teh editor Vi):

12.34.56.78 srv01.domain.com srv01

And save the file via ctrl+x (confirm to save the file) or :wq if you edit the file with Vi.

That’s all, you’re done!

I know there are much more distributions and also other cool control panel systems and I hope this guide will help you even if your system is different.

 

Related posts

Comments

Trackback URL for this post: http://www.web-development-blog.com/archives/how-to-setup-the-dns-and-name-server-for-a-directadmin-web-server/trackback/

How-to setup the DNS and name server for a DirectAdmin web server…

A dedicated server is a low cost alternative for webmaster with a limited budget. Using a control panel makes it easy to create hosting accounts without using the Linux command line. This how-to article covers the last configuration you need to to befo…

I like DA a lot, easy to use cheaper than others and it’s very fast!

I used Ensim, cPanel and Plesk and none of them is that powerful like DirectAdmin.

I have DirectAdmin v1.30.2. There is no “IP Management”, “User Level” or “DNS management”.

How can I get acess to DNS management? I’d like to resolve my domain name.

Thanks in advance

How can I get acess to DNS management? I’d like to resolve my domain name.

do you own the server?

I registered my domain name “brichant.eu” and I when I log in to Direct Admin it states “brichant.eu” as domain name. But I do not see a link to IP Management.

@BRICHANT,

sounds to me that you’re not the owner of that server…
Contact your reseller or the hosting provider.

This tutorial is about how to setup the name servers for a dedicated server.

Why not purchase a managed dedicated server that already has a CP and DNS configured already? No need to try and configure DNS for each site you host. I run HELM CP on Server Intellect managed server. No need to worry about DNS configuration just add the domain and it is live.

@John S

Sure you can buy a managed server and you get some SLA with your machine.

This article is about the first settings you need to do for a fresh dedicated machine. You need to do that “ones” for all dedicated servers even with Plesk and other CP types.

Don’t forget these settings are for the server not for each hosting account. After this is done you need only ~three mouse clicks to create an account in DA.

Thanks for this posting, i have tried 10 days to setup the new server but now it’s up and running thanks to this post!

Adding Wildcard DNS Using Directadmin…

Now to add wildcard DNS using DirectAdmin
If you ‘re planning to use multiple subdomains within your account you will need to setup wildcard DNS resolving. There is an easy solution in DirectAdmin that allows you to do this without modificati…

Sorry, the comment form is closed at this time.