Wednesday 20 November 2013

Types of DNS Records

                                                               DNS Records

A records-
Address (A) records direct a hostname to a numerical IP address.
For example, if you want mycomputer.linukstricks.com to point to your home computer (which is, for example, 192.168.0.3), you would enter a record that looks like:
mycomputer.linukstricks.com. A 192.168.0.3



CNAME records-
CNAME allows a machine to be known by one or more hostnames. There must always be an A record first, and this is known as the canonical or official name.
 CNAME (canonical name) Sets an alias for a host name.
For example, using this record, zeta.linukstricks.com can have an alias as www.linukstricks.com.
Using CNAME, you can point other hostnames to the canonical (A record) address. For example:
ftp.linukstricks.com. CNAME linukstricks.com.
mail.linukstricks.com. CNAME linukstricks.com.

CNAME records make it possible to access your domain through ftp.linukstricks.com, mail.linukstricks.com, etc. Without a proper CNAME record, you will not be able to connect to your server using such addresses.
Entering a CNAME record
If you wanted home.yourdomain.com to point to yourdomain.com, we could enter the record in two ways:

home CNAME linukstricks.com
    The first method allows you to simply enter the subdomain. Do not put a period after the subdomain name.
- OR -
home.yourdomain.com. CNAME linukstricks.com



NAMESERVER (NS) records-
NS records specify the authoritative nameservers for the domain.
Important: Changing NS records may cause your site to stop working. There is generally no need to change NS records.

Entering an NS record
The first step is to delete the old NS records from the table above.
Then, enter two new nameservers records. Be sure that the nameserver hostname is followed by a period, as in this example:

    linukstricks.com NS ns57.domaincontrol.com.

Be sure to put a period after the nameserver hostname in an NS record (ns57.domaincontrol.com. and not ns58.domaincontrol.com).



MX records-
MX (mail exchange) Specifies a mail exchange server for the domain, which allows mail to be delivered to the correct mail servers in the domain.



PTR records-
Pointer records (PTR) are used for reverse lookups. For example, to make 192.168.0.1 resolve to www.linukstricks.com, the record would look like:

1.0.168.192.in-addr.arpa   PTR    www.linukstricks.com.

Note: The IP address is reversed in the first field. Please use a period after your hostname (second field).
Important: PTR records are effective only if your site has its own IP address.
Important: PTR records are only effective if named.conf is manually edited and the proper zone information is added. This can only be done by a root user (the server Admin).



SOA-
SOA (start of authority) Declares the host that's the most authoritative for the zone and, as such, is the best source of DNS information for the zone. Each zone file must have an SOA record (which is created automatically when you add a zone).