A beginner’s guide to Email DNS Records and how to set them up

A beginner’s guide to Email DNS Records and how to set them up

DNS (Domain name system) records are essential to deliver your emails to customers securely.

It’s so normal that you send and receive emails without thinking about how the process works. Though, there’s a complex scenario going behind the curtain with your email clients and email delivery platforms.

DNS records are a crucial element behind this sending and receiving scenario and ensure your emails are delivered to the proper recipients.

This article will show you the necessary DNS records, their importance, and how to set them up.

What is DNS?

What is DNS

[source – Graphic by Zhou Li]

DNS stands for Domain Name System. The job of DNS is to translate domain names into IP addresses which is a must for computer systems to communicate with each other over the web.

You know that the Internet is a gigantic network of interconnected computers and devices. And, it’s inconvenient for computer systems to remember and accommodate all those names, instead, they have unique numerical identifiers like IP addresses.

Suppose, example.com is a domain name. To connect it to a computer and the internet, DNS translates the domain name into a numerical IP address.

To understand better, take a look at how DNS works –

  • A user types a domain name (example.com) in his web browser
  • The browser sends a DNS query to a DNS server
  • The DNS server makes a search for the IP addresses associated with that specific domain name and sends the IP address to the browser
  • Finally, the connection is made between the browser and the internet

Well, you may be the question already popping up in your mind – how is all of this connected with email sending? Let’s begin with the DNS records.

What are DNS records?

DNS records are necessary information that is stored in the DNS database. To be more precise, DNS records are needful components of the Internet database that stores domain name-related information in DNS. They provide some crucial details about domain names like IP addresses and mail server info.

DNS records translate the domain into the IP address of the hosting server. That means if you ask for inboxwp.com, the DNS records will tell you about the server that hosts inboxwp.com. The records ensure that the website is hosted on a secured server.

You can say the same thing about your email domain. If your DNS records are OK, it will tell the recipient server that as a sender your address is secure, and your email would be delivered to proper clients.

Importance of DNS records in Email sending

What are DNS records

There are a bunch of DNS records that need to be configured to email sending. Especially, they are important to give your emails a high deliverability rate.

When your DNS records are well-configured, your email domain will look secure to the recipient’s mail server thus making your domain a legitimate one, and your email won’t end up as spam.

A lack of proper configuration of DNS records causes your sender authentication irreparable harm. Besides, the email won’t get access to user inboxes but to spam folders. Also, there is a potential risk that the email domain may be rejected by several recipient servers and lost its legitimacy as a secured one.

Therefore, if you have the DNS records right, you are going to get the following advantages –

  • Improve your deliverability rate
  • Increase your sender reputation
  • DNS records are helpful to load balancing. That means it can distribute incoming network traffic across multiple servers
  • Protect the email domain from potential security risks like phishing attempts or spoofing attacks, etc

The most useful DNS records for email servers

1. DNS MX record

A ‘Mail Exchange’ MX record is like a car, it carries an email to the mail server. An MX record shows how emails should be directed following the Simple Mail Protocols (SMTP). This record must always point to another domain.

As a result, when you sent an email, for example – to [email protected], the mail client is going to look for its MX records to identify the sending server, and to find out to which server it should be delivered. That’s how your emails gonna have a secure delivery.

Example –

example.com.   IN   MX   10 mail.example.com.

How to Setup MX record

First, you need to know what information an MX record contains. An MX record has – the hostname, IP address of the email server and the priority values of multiple mail servers.

You can get all the above infos from your ESP (Email Service Provider), and the job is simple. Just go to your DNS records and add the MX record there.

2. TXT Record

TXT record stores the text data in the DNS database. That means a TXT record lets you associate arbitrary text with a domain or subdomain. Overall, a TXT record provides text information about a domain like – domain verification data or SPF (Sender Policy Framework) data, etc.

Here’s what a TXT record should look like –

TXT Record example

[Source – constellix]

DNS records mostly consist of computer language or numeric databases, at the same time, the TXT record provides both human and machine-readable guidance.

Well, the primary job of the TXT record is to add information about SPF (Sender Policy Framework) and DKIM (Domain Keys Identified Mail) records.

a. What is an SPF record?

TXT records play an important role to define SPF policies for your email authentication. It helps prevent email spoofing by specifying which mail servers are authorized to send email on behalf of a domain.

You can get your SPF record from your ESP (Email service provider). After the SPF record is available to you, all you need to create a TXT record in your DNS.

What is a DKIM record?

DKIM (Domain Keys Identified Mail) is for authenticating your email, it will give your email domain a digital signature.

It will allow your email receiver to check whether it was sent from an authorized owner of the domain.

The DKIM signature is a header added to your email, and it is secured with encryption.

How to Setup DKIM

A DKIM header should look like the following example –

v=1; a=rse-ufc989; 
d=demo.com; s=large-email;
b=LK09yytPoaw78hhkshyyyatafw877hagegvwqwe3mehaspoe034ieo+ ieor99juTGVsebfhhvo/HHwien34njsdbf7ouuseebsQIO/dheu78jhuwb=

It’s similar to implementing any other DNS records. Your ESP would be providing the DKIM keys. Hence, you need a separate DKIM key for each of your domains.

After you get the DKIM key, publish the public DKIM to your DNS as a TXT record.

3. CNAME record

CNAME record stands for canonical name records. The main job of a CNAME record is to connect or map one domain to another. It would be helpful when you want to point a domain or subdomain to another domain name.

domain1.com IN CNAME domain2.com

Whenever a DNS resolver faces a CNAME record, it will look for the associate domain name. Then complete the resolution process by using the target domain’s records.

How to setup the CNAME record

To set up a CNAME record, you get access to your DNS management panel or control panel which will be provided by your ESP (domain register or DNS hosting provider). The steps may vary following the different email service providers.

To implement a CNAME record, you typically need access to the DNS management interface or control panel provided by your domain registrar or DNS hosting provider. The exact steps may vary depending on the specific provider you are using.

Also Read: A Beginners Guide to Email Protocols and How to Choose Them

4. A (Address) record

A record is for connecting or mapping a domain or subdomain to an IP address. They don’t have any direct impact on your email, but they are crucial for linking your domain and IP address.

A (Address) record is useful for configuring the hostname of the mail server specified in the MX (Mail Exchange) record.

5. PTR (Pointer) record

A PTR record is similar to an A record in nature, but its job is just the opposite. A PTR record in DNS point an IP address back to a domain name. This record is important for security reasons, as a PTR record verifies the authenticity of an email server, and prevents it from phishing attempts or spamming.

As a DNS query for A records looking up for IP address, on the other hand, a DNS query for PTR accomplishes a cross-check that looks for the domain for a specific IP address. The process is also called reverse DNS lookup.

6. DNS SRV (Service) record

SRV (Service) record is a DNS record for specifying the location of a specific service relevant to a domain. For example, it supports services like VoIP (Voice Over Internet Protocol), instant messaging, and client-server applications that rely on discovering service endpoints, etc.

The general format of an SRV (Service) record –

_service._protocol.name.   IN   SRV   priority weight port target

SRV records provide data about the service host, address, or port number where the service is running, and the information about the protocol the service is using right now.

To be more specific, the SRV record contains the host and port information for specific communication protocols like SMTP, IMAP, POP, and SIP (Session Initiation Protocol).

When an email client runs a query in the DNS server, the SRV records deliver the port number and hostname of the email server. It helps the email client to establish a connection.

7. DMARC Record

DMARC (Domain-based Message Authentication, Reporting, and Conformance) is a DNS record that allows email domain owners to specify their email handling policies which are authenticated by email receivers.

We’ve already discussed SPF and DKIM, here the DNS DMARC record binds them for more email authentication that can save your email domain from security threats, spam, or phishing attempts.

Here’s an example of a DMARC record –

_dmarc.example.com.   IN   TXT   "v=DMARC1; p=quarantine; rua=mailto:[email protected]; ruf=mailto:[email protected]"

How the DMARC record work

An email claims the domain which it comes from. DMARC policy tells the email receiver in which way your email authentication should be handled. The top 3 policy actions are given below –

‘none’ – the email recipient shouldn’t take any specific action and only collect the relevant data about the email.

‘quarantine’ – it suggests the recipient server treats suspicious emails to mark them as spam and send them to the spam folder.

‘reject’ – it tells the email receiver to reject those emails which have lack authentication and block the delivery.

Start sending emails with a high deliverability rate

We know it’s hard to understand the aforementioned details about email DNS records and what type of DNS record is used for email servers. Especially for non-technical email users.

Throughout this blog, we’ve tried to explain the records as simply as possible. It’s not like you can’t send emails without knowing the DNS records for email.

But if you get at least a clear idea about them, you can easily fathom how the sending process and email servers work simultaneously. Surely, the whole thing improves your caliber as a pro email marketer.

Therefore, to achieve a secure and high deliverability rate for your transactional emails, you can implement InboxWP, a tool that helps you send WordPress emails better.

Photo of author

Kaji Enamul Islam

Enamul is an author and marketing enthusiast. He loves to write about eCommerce, WordPress, and life. Besides, his addiction to fiction, fact, movies, and books are possessive.