# Setup DNS

This guide helps you setup the necessary DNS records for your domain

### MX record <a href="#mx-record" id="mx-record"></a>

#### What is an MX record? <a href="#what-is-an-mx-record" id="what-is-an-mx-record"></a>

An MX record tells senders where to send email for your domain. When your domain is registered, it’s assigned several DNS records, which enable it to be located on the Internet. These include MX records, which direct the domain’s mail flow. Simply put, an MX record identifies the mail server that is responsible for receiving emails for that domain name. *Properly configured & propagated MX record is necessary to receive emails.*

#### How do I setup an MX record? <a href="#how-do-i-setup-an-mx-record" id="how-do-i-setup-an-mx-record"></a>

Setting up an MX record at your DNS provider (usually the same as your domain registrar) is a very simple process that can be done in under a minute.

#### Example setup <a href="#example-setup" id="example-setup"></a>

In this example, we will configure MX records for the domain **vonmail.com** hosted on the mail server **meghna.exonhost.com**.

| Host / Name | Type | Priority | Value / Mail Server |
| ----------- | ---- | -------- | ------------------- |
| @           | MX   | 10       | meghna.exonhost.com |

\
**Note:** If your email account is hosted on a different server (for example, **alpha.bdnameserver.com**), replace **meghna.exonhost.com** with your assigned mail server’s hostname. You can find your server hostname in your hosting welcome email or dashboard.&#x20;

**Step 1**

Add primary MX record. This should point to your mailserver hostname and is where a sender would usually send their mail.

![Add primary MX record](https://3627669507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fki1RQsie2MHwgePE29b4%2Fuploads%2FAvZNgsap7w2MNZldUVwF%2Fadd_dns_1.jpg?alt=media\&token=db697409-0ddd-4218-80e9-3bb4f3cf0c67)

**Step 2**

Add backup MX records pointing to `alt1.exonhost.com` and `alt2.exonhost.com`. This is where a sender would send to if the primary MX (server) is offline. These geo-redundant backup MX servers would queue mails in the event of primary MX downtime and relay them to the primary MX once it’s online.

![Add backup MX 1 record](https://3627669507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fki1RQsie2MHwgePE29b4%2Fuploads%2FpAuBxr0iZZgtHrCc48S1%2Fadd_dns-2.jpg?alt=media\&token=2a86b2fe-7b8e-4afa-8cfa-5569965df06a) ![Add backup MX 2 record](https://3627669507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fki1RQsie2MHwgePE29b4%2Fuploads%2F7Vf2FrRkCdIbzACXcp1X%2Fadd_dns-3.jpg?alt=media\&token=bf6cddff-a2ab-42ab-9062-f6315d9f37d4)

**Overview**

Finally, here’s an overview of the configured MX records:

![MX records overview](https://3627669507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fki1RQsie2MHwgePE29b4%2Fuploads%2FZN16yUOLzebjcNuNTdA0%2Fadd-dns-4.jpg?alt=media\&token=d4b09aa7-8a2c-4ce8-8d8f-8b88f62aa88c)

**Caution**

Make sure to remove your old host’s MX records (if any).

***

### SPF record <a href="#spf-record" id="spf-record"></a>

#### What is an SPF record? <a href="#what-is-an-spf-record" id="what-is-an-spf-record"></a>

An SPF record is actually a specific type of TXT record that identifies which mail servers are permitted to send email on behalf of your domain. The purpose of an SPF record is to prevent spammers from sending messages with forged addresses at your domain. Recipients (usually their email service providers) can refer to the SPF record to determine whether a message purporting to be from your domain comes from an authorized mail server. *Properly configured & propagated SPF record is necessary to send emails (using ExonHost’s Premium relay).*

#### How do I setup an SPF record? <a href="#how-do-i-setup-an-spf-record" id="how-do-i-setup-an-spf-record"></a>

Setting up an SPF record at your DNS provider (usually the same as your domain registrar) is a very simple process that can be done in under a minute.

#### Example setup <a href="#example-setup_1" id="example-setup_1"></a>

In this example, we will configure SPF record for the domain `vonmail.com`.

**Step 1**

Add a DNS `TXT` record pointing to `v=spf1 mx a:relay.mymailcheap.com -all`

![Add TXT record](https://www.mailcheap.co/help/nms/images/spf1.png)

**Overview**

Here’s an overview of the configured SPF record:

![SPF record overview](https://www.mailcheap.co/help/nms/images/spf2.png)

**Caution**&#x20;

SPF is configured as a `TXT` record in your DNS manager. SPF *should not* be configured using the deprecated `SPF` record type. A domain should have only 1 SPF record; remove your old host’s SPF record (if any).

***

### DKIM <a href="#dkim" id="dkim"></a>

#### What is a DKIM record? <a href="#what-is-a-dkim-record" id="what-is-a-dkim-record"></a>

A DKIM record is actually a specific type of TXT record to verify that a message’s content is trustworthy, meaning that they weren’t changed or tampered from the moment the message left the initial mail server.

#### How do I setup a DKIM record? <a href="#how-do-i-setup-a-dkim-record" id="how-do-i-setup-a-dkim-record"></a>

Setting up a DKIM record at your DNS provider (usually the same as your domain registrar) is a very simple process that can be done in under a minute.

#### Example setup <a href="#example-setup_2" id="example-setup_2"></a>

In this example, we will configure DKIM record for the domain `vonmail.com`.

**Step 1**

DKIM keys are unique to each domain and must be generated from [Mail Portal](https://meghna.exonhost.com). Once logged in to *Mail Portal*, from the menu bar > select *Domains* > from the list of Actions > *DKIM* > *Enable*. Please wait up to 1 minute for the DKIM key to be generated.

![Generate DKIM key](https://www.mailcheap.co/help/nms/images/dkim0.png)

**Step 2**

Add DKIM record in your DNS manager. Take particular note of the host value `default._domainkey`. That is, to create a DKIM record for the domain `vonmail.com`, the TXT record hostname must be `default._domainkey.vonmail.com`. The record must point to the DKIM key generated above.

![Add DKIM record](https://www.mailcheap.co/help/nms/images/dkim1.png)

**Overview**

Here’s an overview of the configured DKIM record:

![DKIM record overview](https://www.mailcheap.co/help/nms/images/dkim2.png)

***

### DMARC <a href="#dmarc" id="dmarc"></a>

#### What is a DMARC record? <a href="#what-is-a-dmarc-record" id="what-is-a-dmarc-record"></a>

A DMARC record is actually a specific type of TXT record used for email authentication that specifies a clear policy to enforce when SPF and DKIM fails. This record is paramount for preventing spoofing of your domain.

#### How do I setup a DMARC record? <a href="#how-do-i-setup-a-dmarc-record" id="how-do-i-setup-a-dmarc-record"></a>

Setting up a DMARC record at your DNS provider (usually the same as your domain registrar) is a very simple process that can be done in under a minute.

#### Example setup <a href="#example-setup_3" id="example-setup_3"></a>

In this example, we will configure DMARC record for the domain `vonmail.com`.

**Step 1**

Add DMARC record in your DNS manager. Take particular note of the host value `_dmarc`. That is, to create a DMARC record for the domain `vonmail.com`, the TXT record hostname must be `_dmarc.vonmail.com`. The record should point to `v=DMARC1; p=quarantine; pct=100`.

![Add DMARC record](https://www.mailcheap.co/help/nms/images/dmarc1.png)

**Overview**

Here’s an overview of the configured DMARC record:

![DMARC record overview](https://www.mailcheap.co/help/nms/images/dmarc2.png)

Note

Both SPF and DKIM must be configured before setting up DMARC.

***

## Verify DNS <a href="#verify-dns" id="verify-dns"></a>

Verify and test your DNS settings by sending an email to `check-auth@verifier.port25.com` to get back a diagnostics report
