Skip to main content

Most Commonly Used DNS Records

Updated this week

DNS

DNS (Domain Name System) is essential for connecting a website or computer to the internet. It works like a phone book, using IP addresses to tell the internet where each site is located. Routing is done through various records that are attached to the name server. Below is a list of the most common DNS records and their functions:

A Record

Function: Directs traffic to an IPv4 address (e.g., 127.0.0.1). This is arguably the most common way to route website traffic.

Example:

@ 10800 IN A 127.0.0.1

AAAA Record

Function: The same as an A record, but for IPv6 addresses. It is less common, as not all providers necessarily offer IPv6 routing yet.

Example:

@ 10800 IN AAAA 123:123:123:123

ALIAS Record

Function: Used when you want to point the domain to a server hostname instead of an IP address. You cannot use an A or AAAA record simultaneously. ALIAS records also do not support DNSSEC.

Example:

@ 10800 IN ALIAS example.seravo.com.

CNAME Record

Function: Used to point a subdomain directly to a server hostname, similar to the ALIAS record.

Example:

www 10800 IN CNAME example.seravo.com.

MX Record

Function: Used for email traffic routing. Usually, there is more than one record to ensure email reliability. Only one service provider's MX records can be active at a time.

Example:

@ 10800 IN MX 10 spool.mail.gandi.net.
@ 10800 IN MX 50 fb.mail.gandi.net.

NS Record

Function: Used to point a subdomain's traffic to an entirely different nameserver.

Example:

nameserver 1800 IN A 88.88.88.88

TXT Record

Function: Allows you to "add" any text to the domain. This is often used for activating various services and for security verification.

Example:
​@ 10800 IN TXT "an example of anything that could be read here"

SPF Record

Function: Stands for Sender Policy Framework. This is not a distinct record type but a special TXT record that specifies which servers are authorized to send email from your domain. If messages are attempted from unauthorized servers, the sender is deemed unverified, and the message will very likely be flagged as spam.

Example:
​@ 10800 IN TXT "v=spf1 include:_mailcust.gandi.net ~all"

SRV Record

Function: Used to specify the location of a service via a hostname and port.

Example:

_imap._tcp 10800 IN SRV 0 0 0 .
_imaps._tcp 10800 IN SRV 0 1 993 mail.gandi.net.
_pop3._tcp 10800 IN SRV 0 0 0 .
_pop3s._tcp 10800 IN SRV 10 1 995 mail.gandi.net.
_submission._tcp 10800 IN SRV 0 1 465 mail.gandi.net.​
Did this answer your question?