Traditional DNS Howto - Page 5

A Records

Up to now we have used the domain names,, and, but we did not specify anywhere to which IP addresses these domains should point to. That's where A records come into play. A records are the most important DNS records; with them you can create host addresses. Let's create our first A record:   A

This means that has the IP address Remember my hint about the '.'? You can also write


which means exactly the same.

Now in a browser you are used to typing instead of, aren't you? is technically totally different from, but obviously you expect to see the same web site for both. Therefore we create this record:

www                A

which is the same as              A

Finally we specify and

server1            A
ns0 A points to a different IP address which makes sense because it is our secondary nameserver which should be on a different system in case our primary nameserver goes down.

CNAME Records

CNAME is short for "canonical name", you can think of it as an alias to an A record. For example,

ftp                CNAME www

means, is an alias for, so points to the same machine as

A CNAME must always point to an A record; a CNAME must not point to another CNAME! In addition to that, you must not use CNAME records for MX and SOA records. For example,

                   MX 10 ftp

is not allowed!

The usage of CNAMEs has its pros and cons. I can hear you say "If the usage of CNAME records has that many restrictions, why don't we always use A records?" That's true, but imagine you have hundreds of machine names as A records, pointing to the same IP address, and now you move the server to another data center where it is assigned a different IP address. You'd have to update every single A record. If you had just one A record and all other records were CNAMEs, you'd just have to update one A record...

Share this page:

0 Comment(s)