How Nameservers work

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » DNS

How Nameservers workLast Modified: Jun 5, 2015, 3:16 pm
The Domain Name System (DNS) is the system that converts domain names ( into IP addresses (  This system is far simpler than most people realize.

There are 3 main components to the dns system:
- Parent Nameservers (there are 13 of them in the world)
- Your domain name registrar (where you buy your domain)
- Your own Name Server (where you control the dns values of your domain)

1) When you go to your registrar, you'll purchase a domain.  When you purchase the domain, you'll specify the nameservers you want that domain to use.  Your registrar will take this information (the domain name and the nameservers it uses) and will send that to the parent nameservers.   This can sometimes take a few days to sync up.   Once finished, any query of your domain to the parent nameservesr will return the names of the nameservers you specified with your domain.  Subsequent queries will ask those nameservers (usualy at your own server), using the zones and values you've setup through DirectAdmin.

2) If you wish to create your own nameservers for your domain (eg:, you'll have to go to your registrar to "register" you nameservers as nameservers before you can use them.  The first step is usually to make sure they resolve.  To do this, you can either go to Reseller Level -> Nameservers, and create nameservers there... or to accomplish the same effect, simply go to manage your domain's zone (Admin Level -> DNS Admin -> and add the 2 "A" records for ns1 and ns2, just like any other subdomain (eg, the same as for www, ftp, pop, etc..).  At the bottom of the page, use the "Add A Record" field to create:

ns1  A
ns2  A

where and are the IPs you want your nameservers to use.   This is essentially all a nameserver needs to have to exist (on the part of your server anyway, the rest is at the registrar).

Once your and values resolve, go to your registrar and register them as nameservers.

3) Propagation of the new values might take upwards of a few days, so patience is important.   Once they're registered, you can again go to your registrar and set your domain to use these new nameservers.   You'll also need to go back to your domain's dns management and set these new nameservers in the "NS" record values.

The order of events for a dns lookup of is as follows:
  1. A client queries his ISP's nameservers.
  2. His ISP's nameservers query the parent dns servers for, they return it's nameservers, (eg: and
  3. His ISP's nameservers then query either or (choice is random) for the value of
  4. either ns1 or ns2 will return the IP address of the "www" A record for to the ISP's nameservers.   The ISP's nameserver caches this value for usually about 4 hours so further queries are not required during that time.  The IP is returned to the client to use to access the server.

The locations in DirectAdmin where the NS records will be used, are specified at:
  • Admin Level -> Admin Settings -> ns1/ns2:  The main nameservers for the box. Use to give to new Admins and Resellers, and for fallback values.   The IPs that these resolve to are the IPs used for "virtual" nameservers at the Reseller Level.
  • Reeller Level -> Nameservers -> ns1/ns2 (bottom set):  The default values that are given to newly created Users created by this Reseller.
    As an "Admin", these values will be given to a new Reseller if "personal dns" is not enabled.
  • Reseller Level -> List Users -> username -> ns1/ns2:  The default values that are given to newly created domains by the User.
All of these settings ultimately end up changing just the NS records of a domain, so by changing the NS values manually, that's all that really matters.
Related Helpfiles doesn't work, but works fine (or vice versa)
How the multi server dns clustering works
What the period does, at the end of a dns value

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST