MailSlurp logo

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.

Use with your tools

Changed your DNS settings but email still isn't working? First check the records that are publicly visible: the nameservers for your domain, the MX records that route incoming mail, and the TXT records used for authentication.

MailSlurp's DNS API lets you run those lookups from a script. Once the records look right, send a test message and inspect its headers to check the mail path too.

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 message to a MailSlurp inbox and inspect its headers. You'll see which route and authentication results that test message used.

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

  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.

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

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.