Setup DNS for a Mail Server

DNS or Domain Name Server is used to connect your domain names to web servers. The most basic and common DNS records like CNAME and A records are used to create a mail server. In the section below, we will be using the CNAME, TXT, and Mail Exchange (MX) records.

Setup DNS for a Mail Server

CNAME is a type of resource record that connects a domain name to another and Mail Exchange or MX records will help you with the address where the email should be delivered. 

Here, we’ll be using the below-listed information to Setup DNS for a Mail Server.


Name: mail IP address:


Entry 0: mail

Entry 10: mail


mail v=spf1 a mx ptr ~all

Now, let’s see how to set up DNS for Mail Server using the domain.

  • First, make sure that you have a domain name in
  • If not, create one and then continue the process.
  • Open your computer’s default web browser.
  • Go to the web page.
  • Sign in to your account.
  • Go to the My Account section.
  • Expand the Domains tab.
  • If you have multiple domain names, then select the one you wish to configure.
  • Click the Manage button beside the selected domain name.
  • In the window that opens next, go to the DNS ZONE FILE tab.

Configuring the CNAME record

  1. Click the Add Record command line.
  2. Now, a pop-up dialog box titled ADD ZONE RECORD will open.
  3. Select the CNAME record from the RECORD TYPE drop-down menu.
  4. In the HOST field, enter the CNAME record’s name, which is mail.
  5. Enter @ in the POINTS TO field.
  6. Select TTS from the drop-down menu.
  7. Click the FINISH button.
  8. Now, you could see the newly added CNAME record in the ZONE FILE window.

Configuring the Mail Exchange (MX)

  1. Now, click the Add Record command line again in the ZONE File window.
  2. This time, select the MX (Mail Exchange) option from the RECORD TYPE drop-down menu.
  3. In the HOST field, enter @.
  4. Similarly, in the POINTS TO field, type
  5. In the PRIORITY field, type 10 and set the TTL preferences as per your desire.
  6. Click the FINISH button followed by Save Changes.
  7. Now, add one more Priority 0 to the MX record type by referring to the instructions given above.

Adding the TXT record

  1. Click the Add Record command line.
  2. Select the TXT (Text) option from the drop-down menu.
  3. Enter @ in the HOST field.
  4. In the TXT VALUE field, type the following entry: mail v=spf1 a mx ptr ~all.
  5. Select the required TTL option from the drop-down menu.
  6. Click the FINISH button followed by Save Changes.

You have now successfully configured the Setup DNS for a Mail Server.