DNS is a technology used on the Internet and computer networks to translate domain names into IP addresses, which simplifies communication on the internet. The usual example is to see it as a phonebook where you assign a name (domain) to each number (IP number)
With the help of DNS, you don’t need to remember every web pages IP address. All you need to know is the domain name. When you enter the domain, the browser finds which DNS server the domain is on and the DNS server then finds the IP address set for the domain. There are several different types of DNS records that have different functions. The following entries are the most used.
A-records are used to set a domain against a specific IP address. The content of this IP address is retrieved when the user visits the domain or subdomain. You can set any IP address for each domain/subdomain. The IP address needs to be specified in IPv4 format (eg 126.96.36.199). Use AAAA-records for an IPv6 IP address.
How is an A-record built?
* 600 IN A 188.8.131.52
MX-records(mail exchanger) are used to direct email traffic for your domain. You can set multiple MX-records for a single domain. Emails are directed by the priority set on the MX-records. MX-records are entered in text form (mailin1.example.se). Not as an IP address.
How is an MX-record built?
@ 600 IN MX 10 mailin1.example.tld. @ 600 IN MX 100 mailin2.example.tld.
NS-records, also called nameservers, refer to the address where all DNS records for the domain in question are administered. Changing nameservers is done at the domain registrar.
How is an NS-record built?
@ 86400 IN NS ns1.loopiagroup.com. @ 86400 IN NS ns2.loopiagroup.com.
CNAME is used to retrieve DNS settings for the domain name. Those settings take precedence over both A-records and MX-records. This means that the browser first checks the settings for the CNAME records. If it does not find a CNAME, it follows the MX/A-records instructions.
How is a CNAME-record built?
shop 600 IN CNAME www.myshoptet.com.
AAAA-records are an alternative to A-records. It is used if the address of the server you want to collect information from is in IPv6 format.
How is an AAAA-record built?
* 600 IN AAAA 2A03:2880:2110:df07:face:b00c:0:1.
TXT-records are used to add textual information to the domain’s DNS records. It is often used to verify the domain or to add additional information needed to connect to the domain with external services.
How is a TXT-record built?
@ 600 IN TXT "google-site-verification= rXOxyZounnZasA8Z7oaD3c14JdjS9aKSWvsR1EbUSIQ"
Sender Policy Framework (SPF) records is a type of TXT record that contains information about which SMTP (IP) servers the domain is authorized to send email through. The purpose of SPF is to reduce the user’s potential for counterfeiting, thereby preventing spam.
How is an SPF-record built?
v=spf1 a mx include:_spf.websupport.se ?all
SRV records are used to specify the server addresses for specific services. The advantage of SRV records is that it makes it possible to distribute the load to several addresses based on weight and prioritization.
How is an SRV-record built?
_xmpp-client._tcp.exempeldoman.se 1800 SRV 5 0 5222 talk.l.google.com
A CAA-record (Certification Authority Authorization) – is used to identify a certificate provider (CA) that can issue SSL certificates for a specific domain. CAA-records can specify instructions for an entire domain or specific subdomains.
How is a CAA-record built?
@ 600 IN CAA 128 issue "letsencrypt.org"