A & AAAA records
A and AAAA records have similar purpose in the DNS zone file. The A record (also called address record) assigns and IP address to a domain or subdomain, the IP that is stored is in the IPv4 format. AAAA record does the same as the A record, but it stores IPv6 addresses.
The name of the AAAA record derives from the fact that IPv6 addresses require 128 bits to store an address, in contrast to IPv4's 32 bits, which is 4 times greater thus the 4 A's.
Example for A record:
example.com. 17700 IN A 123.22.189.1
This example states that the domain example.com's IP is 123.22.189.1, this data will expire for the DNS sever client's cache after 17700 seconds.
Example for AAAA record:
example.com. 25700 IN AAAA FE80::0202:B3FF:FE1E:8329
This record states the same as the previous example only this time example.com resolves to FE80::0202:B3FF:FE1E:8329 the record class is again Internet, and the time after which this data expires in the cache is 25700 seconds.
CNAME Record
CNAME Records (also known as canonical name records) shows that the specified domain name is an alias of the domain that is presented in the <record specific data> field. An example would be if you wish to make so that regardless of the subdomain that the user enters, the server will always resolve to your primary domain:
*.myprimarydomain.com. 27500 IN CNAME myprimarydomain.com.
The example above is a common convention which is applied in order to make so that even if, for example, the user inputs a wrong amount of w's- e.g. ww. mypriamrydomain.com it will still resolve. This is achieved by the wildcard notation that we won't discuss in this tutorial. The other usage of this is for wildcard subdomains, for ease of the owner of the website, so that he mustn't input a new record for each subdomain that is created.
MX (Mail Exchange) Record
The MX record is used to specify a mail server. It then points to an A record which resolves to the correct IP address for the mail server. In the data specific field you must also specify a priority of the mail server, this convention is necessary If you specify multiple MX record entries In the zone file. The priority indicates which server should be used first if there is a mailing task to be handled, if that sever is unavailable the next one in the priority list will be used instead. The priority dictated by a numeric value where the lower the number the higher the priority, with the highest priority being 0.
Example:
example.com. 17100 IN MX 0 mailserver.com.
The example above specifies that emails sent to mail.example.come should be resolved to the mail server located at mailserver.com. Keep in mind that you must also specify an A record (or AAAA record) pointing to the mail server's IP location.
PTR (Pointer) Record
The pointer record is used to point an IP to a selected host name. PTR records are primarily used for reverse DNS lookup (obtaining a host name via the IP that resolves to that hostname. You should ask your hosting provider regarding details related with setting up a PTR record.
NS (Nameserver) Record
A NS record or (name server record) tells recursive nameservers which name servers areauthoritative for a zone. Recursive nameservers look at the NS records to work out who to ask next when resolving a name.
Example:
domain.com. 28500 IN NS ns1.domain.com.
NSOA (Start of Authority) Record
The start of authority record is absolutely necessary for a DNS zone file. Its purpose is provide information about the server, such as the authoritative master name server for the zone file, an email address of the server's administrator. The SOA record also contains a parameter that contains the domainID and timers which give out information about the expiration of the zone file, update period timer. An important fact is that only one SOA record may exist in a zone file.
Example:
domain.com. 17500 IN SOA ns.domain.com. user.domain.com. ( 5002130210 2d 1h 2w 1h )
The example above gives the following information:
ns.domain.com is the master name sever for domain.com's zone file
User.domain.com is the email to the name server's administrator
( 5002130210 2d 1h 2w 1h ) - the informative parameter containing the domain id, and two time parameter indicating the expiration time of the zone file, and the last time that an update was made.
SRV (Service) record
SRV records give information about available services on your system. Usually they are used together with SIP configuration. Particularly SRV records have a specific notation for specifying the name of the owner domain. It is constructed in this way:
_<name of service>._<protocol name>.domain.com
The parameters that must be set in the record specific data field:
1.Host of the specified service - a domain name must be input
2.a priority integer - works in the same way as the MX priority parameter
3.weight - used to distribute the load that can be accumulated on any of the servers that are being used(it is indicated by an integer and the lowest amount of load that can be set is 0)
4.port on which to connect in order to obtain the desired feature.
Example of an SRV record:
_http._tcp.domain.com. 17500 IN SRV 0 3 80 example.com.
The provided functionality is http, the protocol is tcp, and the 3 numbers in the record specific data field are priority=0, weight=3 and port = 80, after which is the host's name - example.com.
TXT (Text) record
Text records are used to store any information in a txt format on the zone file. Frequently the TXT record is used to store information such as domain keys and Domain Keys Indentified by e-mail. In some occasions there might be a txt record containing information about the servers network, datacenter and other types of administrative information. In the more frequent cases it is used to store sender policy framework (SPF) specifications.
Example of a txt record that is storing SPF details:
domain.com. 75000 IN TXT "v-spf1 - all"
NAPTR (Naming Authority Pointer) record
Allows the use of regular expression based rewriting for domain names, in order to use them as URI's.
These records are usually used along with SIP (session initiation protocol), in order to root telephony sessions over IP networks.
NAPTR (Naming Authority Pointer) record
Allows the use of regular expression based rewriting for domain names, in order to use them as URI's.
These records are usually used along with SIP (session initiation protocol), in order to root telephony sessions over IP networks.