DNS Records are the prime defining factor for a proper functioning of any Name Service. There are various records that can be defined for a Domain of which some carry much importance while the rest are just for information. These important Records are as follows:
NS Record Name Server Record which indicates the Authoritative Name Servers for a particular Domain. The NS records of the Authoritative Name Server for any given Domain will be listed on the Parent Server. These are called as the Delegation Records as these records on the Parent Server indicates the delegation of the domain to the Authoritative servers. The NS record will also be listed in the Zone records of the Authoritative Name Server itself. These records are called as the Authoritative Records. The NS records found on the Parent Server should match the NS records on the Authoritative Server as well. However, you can have NS records listed on the Authoritative server that is not listed in the Parent Server. This arrangement is normally used to configure Stealth Name Servers. NS Records syntax: itsyourip.com. IN NS ns1.beta.timdorr.com. where, IN indicates the Internet NS indicates the type of record which Name Server record The above indicates that the ns1.beta.timdorr is the authoritative server for the domain itsyourip.com
A record is the Address record which maps the domain / host to a valid IP Address. This is the record which indicates that the particular host can be reached at the given IP Address. There can be more than one IP Address to the same host by using multiple A Records. This becomes useful when there are more than one server hosting a domain or a website. A Record Syntax: Itsyourip.com. IN A 22.214.171.124 Where IN indicates Internet A indicates the Address record. The above example indicate that the IP Address for the domain itsyourip.com is 126.96.36.199
CNAME stands for Canonical Name. CNAME Records are used mainly to assign an alias to an existing hostname. In simple words, a particular host can be referred by more than one Name. However, there should be a A record for the host with its original name (Canonical Name) and the rest of the names assigned to the host are pointing to the original or canonical name. CNAME Syntax: www.itsyourip.com. IN CNAME itsyourip.com. where, IN indicates Internet CNAME indicates CNAME record. The above indicates that www.itsyourip.com is nothing but itsyourip.com and hence, when you type www.itsyourip.com in the address bar of an internet explorer, you end up at itsyourip.com.
MX Record is the Main Exchanger Record. This is a service record which specifies where the mails for a particular domain are to be delivered. There can be more than one MX record for a given Domain. This is to have one or more backup servers to which the mails can be delivered in the event the default server has failed for some reason. The MX records have a field for Priority number. This is mainly to specify which is the first server to which a Domains emails should be delivered and which falls next in the queue in the event the 1st server is down and thereon. The server which has the lowest priority number will be the default server to which the mail is delivered. The next lower priority server will be the 1st backup and the next the 2nd backup server and so on. CNAME Syntax: Itsyourip.com. IN MX 0 mail.pcsupport.x-host.uni.cc Where, IN indicates Internet MX indicates the Mail Exchanger Record The above indicates that mails for itsyourip.com are being delivered to the server mail.pcsupport.x-host.uni.cc. Wilcards can be used in the MX records to allow mails for all the hosts to be delivered to a particular host. For example, *. Itsyourip.com. IN MX 0 mail.pcsupport.x-host.uni.cc indicates that all emails for all the hosts (or subdomains) of itsyourip.com will be delivered to mail.pcsupport.x-host.uni.cc
PTR Records refer to Pointer Record. This is mostly used to have a particular host be recognized on the internet by using an IP Address instead of the hostname. These are also called Reverse DNS Lookup address. When used for Reverse DNS lookups, these records are exactly the reverse of the original A records with the exception that the address is reversed and added with a in-addr.arpa suffix. PTR Record Syntax: 188.8.131.52.in-addr.arpa. IN PTR itsyourip.com Here as you see the IP Address is reversed and added with in-addr.arpa and this has come to the left side while the actual domain name has gone to right side of IN PTR. This is mostly used as a security and an anti-spam measure wherein most of the webservers or the email servers do a reverse DNS lookup to check if the host is actually coming from where it claims to come from. It is always advisable to have a proper reverse DNS record (PTR) is been setup for your servers especially when you are running a mail / smtp server. SOA Records: SOA records stand for Start of Authority. This is the most important record for a domain. This server indicates the start of authority for the specified domain and will have more information init unlike other where there is only one specific information is provided. The SOA Record indicates the Primary Authoritative server for a Domain, a contact email address, the serial number and the various time related information. The Serial number is the key element which indicates if a Slave or a secondary server should update its information. Everytime a change was made to DNS records, this number is incremented only then when a slave DNS server contacts the primary server will know that there was a change made and hence have to update its record. For this case, the serial number is always used in the YYYYMMDDXX format where YYYYMMDD indicates the date of the day the changes were made and XX indicates the nth number of time the records were changed. SOA Record Syntax: itsyourip.com in SOA ns1.beta.timdorr.com. server.asmallorange.com. 2006011501 ; Serial14400 ; Refresh 7200 ; Retry 3600000 ; Expire 86400 ) ; Minimum Where, IN indicates Internet SOA indicates Start of Authority record ns1.beta.timdorr.com is the Primary Name Server Server.(@)asmallorange.com is the contact email Serial indicates the Serial Number Refresh indicates the time in which it should contact the Primary server for changes in the DNS records (Serial Number) Retry indicates the time in which the slave server should retry in the event a connection was refused by the Primary Server. Expire indicates when the local information that the slave server holds becomes invalid in the event it cannot refresh from the Primary server. Minimum indicates how long other DNS servers should hold this domains information in its cache.