DNS Lookup Nameservers

Easily Verify Domains and Query Mail Servers with MailSlurp - Fetch Name Server Records for Free using the MailServerController

  • Table of contents

MailSlurp lets you look up name server records free using the MailServerController. Here is an example:

Fetch DNS records with curl

Here is an example of querying the mailslurp domain for A, MX, and TXT records.

Note the use of the API KEY parameter in the header

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"
    }
  ]
}

Test your own domains

You can use MailSlurp APIs to query and test any domains you wish.

Email and SMS Platform
Create a free account in 3 clicks