DNS (Domain Name Service) provides a map from the user friendly hostname to the not so user friendly IP address of a specific web service.
NS (Name Server) records are specified with the domain registrar, the company through which you have registered your domain name. These records tell the world where to look to find any DNS records for that domain e.g. netaffinity.com.
It is usually required to specify at least 2 NS records per domain and can often be more, each one pointing to a different physical server. The purpose of this is to make sure that the DNS records are always available even in the event that one or more of the nameservers is down.
Types of DNS record
The following are the most commonly used types of DNS record:
|A||Specifies IP addresses corresponding to your domain and/or its subdomains.||22.214.171.124|
|CNAME||Specifies aliases from your domain's subdomains to other domains / subdomains.||bke1.netaffinity.net|
|MX||Specifies where the emails for your domain should be delivered. Can be an IP or domain/subdomain.||mail.mydomain.com|
|TXT||Store text-based information related to your domain. One of their most common uses is for SPF data.||v=spf1 include:netaffinity.net -all|
TTL (Time To Live) is a value that is set on each individual DNS record to tell all other DNS servers how long they are allowed to cache that specific record before looking for updated information. The value is set in seconds and it is not uncommon to find values averaging around 86400 = 24hrs.
The higher the value, the quicker the DNS will be located and the faster the site will start to load.
The lower the value, the greater number of "hops" will be required to determine the actual location of what you're looking for and the slower the site will start to load.
Therefore the TTL should be as high as possible unless there are specific circumstances at play.
SPF (Sender Policy Framework) records are added to prevent email spoofing. It basically gives specific servers permission to send emails for that domain.
If no SPF (or similar) record exists then any server can send emails for that domain. If an SPF record exists, depending on the content of that record, only those servers (or alias hostnames) that are specified are permitted to send emails for that domain. Emails sent from servers not listed are very likely to be marked as SPAM when being received.