How-to: Understand Internet Nameserver records

(Nameserver) A name server is a computer server that hosts a network service for providing responses to queries against a directory service. It maps a human-recognizable identifier to a system-internal, often numeric identification or addressing component. (

Accurate but dull. Nameservers work behind the scenes to translate the web address that you type in to a machine address that will actually serve up the page.

Nameserver records are a rather complicated subject that we'll barely scratch the surface of here.

There are three basic types of records that nameservers contain about domains and hostnames.

These are A, MX and CNAME records.
  • An A record resolves a host name, say,,,, to an IP address such as (that's Google, by the way).
  • An MX record is a Mail eXchange record and resolves mail to a mail server.
  • A CNAME record is does a more complex job; what it does is to make one hostname inherit all the attributes of another hostname. For example, an A record for resolves to If you set a CNAME for to inherit the attributes of then it will copy's a record and also resolve to Any changes to will also change
CNAME records are often be confusing, misunderstood and have unforeseen consequences, so try to avoid them. Unless you have hundreds of records to manage, it is worth avoiding CNAME records, which quickly become ambiguous and even contradictory, and stick to A and MX records.

How do you set nameserver records?
You need to have administrative control of the domains in question and have control panel access to the nameservers on which they reside. there, you can edit the three DNS records for the given domain name.

For example, it is normal to have your website on one server and have your mail on another. To begin, youyou need to add A records to resolve your domain and it's most popular subdomain to your web server. Assuming your servers' IP is then they should look like:
  • A
  • A
This resolves your domain and the www subdomain to your webserver.

Next add your MX record for the mail. MX records must be set to resolve to a hostname and not an IP address. As such you will need (or find out) what the mail exchange hostnames are. So in our example, let's say that they are and, you then need to add:
  • 10 MX
  • 20 MX
The numbers indicate the priority of the records. Your mail client will try to route outgoing email to the lower numbered record first; if it is offline then it will try the next highest one.

That should be it. RC