---
title: "DNS Setup Guide"
description: "A record-by-record walkthrough of the MX, SPF, DKIM, and DMARC entries email needs."
source: "https://www.mailmark.dev/guides/dns-setup"
site: "Mailmark"
---

# DNS Setup Guide

Configure your domain's DNS records to send and receive email with Mailmark. This takes about 10 minutes, plus DNS propagation time (up to 48 hours).

## Before you begin

- You must own the domain you want to configure.
- You need access to your domain registrar's DNS settings (Namecheap, Cloudflare, GoDaddy, and so on).
- Mailmark shows you the exact values to copy. You do not need to calculate anything.

## 1. Add your domain in Mailmark

Go to Dashboard -> Domains -> Add domain and enter your domain name (e.g. `yourcompany.com`). Mailmark generates the DNS records you need to add.

## 2. Add MX records (incoming email)

MX (Mail Exchanger) records tell the internet where to deliver email for your domain.

| Type | Host / Name | Value | Priority | TTL |
| ---- | ----------- | ----- | -------- | --- |
| MX | @ | inbound.mailmark.dev | 10 | 3600 |
| MX | @ | inbound-alt.mailmark.dev | 20 | 3600 |

## 3. Add an SPF record (sender authentication)

SPF tells receiving servers which services are authorised to send email on behalf of your domain.

| Type | Host / Name | Value | TTL |
| ---- | ----------- | ----- | --- |
| TXT | @ | v=spf1 include:spf.mailmark.dev ~all | 3600 |

If you already have an SPF record, add `include:spf.mailmark.dev` to it rather than creating a second TXT record. A domain can only have one SPF record.

## 4. Add a DKIM record (email signing)

DKIM adds a cryptographic signature to your outgoing emails. Mailmark generates a unique DKIM key for your domain; find it in Dashboard -> Domains -> [your domain] -> DNS records.

| Type | Host / Name | Value | TTL |
| ---- | ----------- | ----- | --- |
| TXT | mailmark._domainkey | v=DKIM1; k=rsa; p=<your key from dashboard> | 3600 |

## 5. Add a DMARC record (optional but recommended)

DMARC tells receiving servers what to do with emails that fail SPF or DKIM checks. Start with a monitoring-only policy.

| Type | Host / Name | Value | TTL |
| ---- | ----------- | ----- | --- |
| TXT | _dmarc | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com | 3600 |

## 6. Verify your domain

Go back to Dashboard -> Domains and click Verify domain. Mailmark checks for all the records above. DNS changes typically propagate within minutes but can take up to 48 hours.

Once verified, you are ready to create mailboxes and send email.

## Next steps

- [Create your first mailbox](/docs)
- [Improve deliverability](/guides/email-deliverability)
- [Check your records](/tools/email-deliverability-checker) with the free deliverability checker.

---

Mailmark - email hosting and campaigns for your own domain. Canonical page: https://www.mailmark.dev/guides/dns-setup | [llms.txt](https://www.mailmark.dev/llms.txt) | [OpenAPI](https://www.mailmark.dev/openapi.json) | [sitemap](https://www.mailmark.dev/sitemap.xml)
