> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dns records

# Configuring DNS Records

When you add a domain in Mailofly, you will be generated a set of DNS records. Adding these records to your DNS registrar enables sending authorization and deliverability protections.

***

## Required DNS Records

### 1. DKIM (DomainKeys Identified Mail)

DKIM signs outgoing emails with a cryptographic key, allowing recipient email providers (Gmail, Outlook, Yahoo) to verify the email was sent by an authorized server.

Mailofly provides **3 CNAME records** for Easy DKIM:

| Record Type | Name / Host                         | Value / Target               | TTL          |
| :---------- | :---------------------------------- | :--------------------------- | :----------- |
| `CNAME`     | `[hash]._domainkey.yourdomain.com`  | `[hash].dkim.amazonses.com`  | Auto or 3600 |
| `CNAME`     | `[hash2]._domainkey.yourdomain.com` | `[hash2].dkim.amazonses.com` | Auto or 3600 |
| `CNAME`     | `[hash3]._domainkey.yourdomain.com` | `[hash3].dkim.amazonses.com` | Auto or 3600 |

> **Note for Cloudflare users**: Ensure the proxy status for these CNAME records is set to **DNS Only** (gray cloud), NOT Proxied (orange cloud).

***

### 2. SPF (Sender Policy Framework)

SPF designates Mailofly as an authorized sender for your domain.

| Record Type | Name / Host                        | Value / Target                      |
| :---------- | :--------------------------------- | :---------------------------------- |
| `TXT`       | `@` (or `mail` if using subdomain) | `v=spf1 include:amazonses.com ~all` |

*If you already have an SPF record for Google Workspace or Microsoft 365, merge the include rule:*

```text theme={null}
v=spf1 include:_spf.google.com include:amazonses.com ~all
```

*(Never create multiple SPF TXT records on the same root hostname; merge them into one).*

***

### 3. Custom MAIL FROM / Return-Path (MX & SPF)

Setting up a custom MAIL FROM subdomain (e.g. `mail.yourdomain.com`) ensures SPF aligns with your custom domain name rather than a shared relay address.

| Record Type | Name / Host           | Priority | Value / Target                          |
| :---------- | :-------------------- | :------- | :-------------------------------------- |
| `MX`        | `mail.yourdomain.com` | `10`     | `feedback-smtp.us-east-1.amazonses.com` |
| `TXT`       | `mail.yourdomain.com` | -        | `v=spf1 include:amazonses.com ~all`     |

***

### 4. DMARC (Domain-based Message Authentication)

DMARC tells inboxes how to handle emails that fail SPF or DKIM checks. Google and Yahoo mandate a DMARC policy for bulk senders.

Add this TXT record at `_dmarc.yourdomain.com`:

| Record Type | Name / Host | Value                                                         |
| :---------- | :---------- | :------------------------------------------------------------ |
| `TXT`       | `_dmarc`    | `v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; pct=100;` |

* **`p=none`**: Monitoring mode. Messages are delivered normally while you inspect DMARC reports.
* **`p=quarantine`**: Unaligned messages are sent to the spam folder.
* **`p=reject`**: Unaligned messages are dropped completely.


## Related topics

- [Cloudflare DNS Setup](/guides/domains/cloudflare.md)
- [Event types](/webhooks/event-types.md)
- [Custom Domains](/receiving/custom-domains.md)
- [Add domain](/getting-started/add-domain.md)
- [Manage Domains](/domains/managing-domains.md)
