MailSlurp lets you look up nameserver and mail-server records with API calls, then use the results inside an email reliability workflow. That matters when teams are setting up custom domains, checking MX routes, validating SPF/DKIM/DMARC, or confirming that DNS changes did not break inbound email.

Use this guide when a DNS lookup has to support a real email job: receiving mail, sending authenticated messages, monitoring sender health, or proving inbox placement.

## Quick answer

Use MailSlurp DNS lookup workflows to inspect:

- `NS` records for authoritative nameservers
- `MX` records for inbound mail routing
- `TXT` records for SPF, DKIM, DMARC, and verification tokens
- `A` and `CNAME` records used by email services and branded links
- propagation results before running inbox or deliverability tests

After DNS looks correct, send a real message to a MailSlurp inbox and inspect the headers. DNS visibility is useful; message evidence proves the workflow.

## Fetch DNS records with curl

Here is an example of querying the [MailSlurp API](/api/) for `A`, `MX`, and `TXT` records.

```bash
curl -X POST "https://api.mailslurp.com/mail-server/describe/dns-lookup" \
  -H "accept: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{ \"hostname\": \"mailslurp.com\", \"omitFinalDNSDot\": true, \"recordTypes\": [\"A\", \"MX\", \"TXT\"] }"
```

## Name server response

The results from the [DNS lookup](/guides/dns-records/) for `mailslurp.com` look like this:

```json
{
  "results": [
    {
      "recordType": "A",
      "ttl": 30,
      "data": "54.192.73.27",
      "value": "mailslurp.com"
    },
    {
      "recordType": "MX",
      "ttl": 30,
      "data": "10 inbound-smtp.us-west-2.amazonaws.com.",
      "value": "mailslurp.com"
    },
    {
      "recordType": "TXT",
      "ttl": 30,
      "data": "\"v=spf1 include:amazonses.com -all\"",
      "value": "mailslurp.com"
    }
  ]
}
```

## MailSlurp DNS workflow for email teams

1. Query nameserver, MX, and TXT records for the domain.
2. Check SPF, DKIM, DMARC, MX, and reverse DNS with MailSlurp tools.
3. Send a controlled message into a MailSlurp inbox.
4. Inspect headers to confirm authentication and routing.
5. Run inbox placement or spam checks for sender-health changes.
6. Add the DNS and inbox evidence to your release or incident notes.

This workflow is stronger than a DNS-only lookup because it ties records to an actual email outcome.

## Records to check during email setup

| Record  | What it proves                                         | MailSlurp follow-up                           |
| ------- | ------------------------------------------------------ | --------------------------------------------- |
| `NS`    | Which nameservers answer for the domain                | Recheck after registrar or DNS-host changes   |
| `MX`    | Where inbound mail should route                        | Send a test message to a MailSlurp inbox      |
| `TXT`   | SPF, DKIM, DMARC, and verification data                | Inspect headers after a controlled send       |
| `CNAME` | Branded links, tracking domains, or delegated services | Confirm propagation before campaign QA        |
| `PTR`   | Reverse DNS for sender identity                        | Pair with deliverability and blacklist checks |

## Related MailSlurp tools

- [DNS propagation checker](/tools/dns-propagation-checker/)
- [MX record check](/tools/mx-record-check/)
- [SPF checker](/tools/spf-checker/)
- [DKIM checker](/tools/dkim-checker/)
- [DMARC checker](/tools/dmarc-checker/)
- [Email header analyzer](/tools/email-header-analyzer/)

## FAQ

### Can MailSlurp look up MX and TXT records?

Yes. Use the MailServerController DNS lookup endpoint or MailSlurp DNS tools to inspect mail-related records.

### Is DNS lookup enough to prove email works?

No. DNS lookup proves records are visible. MailSlurp inbox tests prove the message can be sent, received, authenticated, and inspected.

### What should I test after changing nameservers?

Check MX, SPF, DKIM, DMARC, and reverse DNS, then send a controlled message to a MailSlurp inbox and inspect the headers.
