guides
DNS Lookup Nameservers with MailSlurp
Use MailSlurp to look up nameserver, MX, TXT, SPF, DKIM, and DMARC records, then connect DNS evidence to email deliverability and inbox testing.
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:
NSrecords for authoritative nameserversMXrecords for inbound mail routingTXTrecords for SPF, DKIM, DMARC, and verification tokensAandCNAMErecords 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 for A, MX, and TXT records.
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 for mailslurp.com look like this:
{
"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
- Query nameserver, MX, and TXT records for the domain.
- Check SPF, DKIM, DMARC, MX, and reverse DNS with MailSlurp tools.
- Send a controlled message into a MailSlurp inbox.
- Inspect headers to confirm authentication and routing.
- Run inbox placement or spam checks for sender-health changes.
- 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
- MX record check
- SPF checker
- DKIM checker
- DMARC checker
- 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.