1. Home
  2. FAQ
  3. Terminal Commands to Check DNS Records Verification

Terminal Commands to Check DNS Records Verification

The following commands or rules can help you verify that the DNS records which you just finished adding in your domain provider are saved properly.

This simple to use,  ready reckoner will help you make sure that those TXT and CNAME records are without any error.

Dig Commands

Dig stands for (Domain Information Groper). It is a command-line tool for querying Domain Name System (DNS) name servers.

Using these commands is super simple :

STEP 1: open the terminal box in your computer

STEP 2: Open the DNS records CSV shared by Pepo Campaigns

STEP 3 : Verify the records as shown below

1) Domain verification

dig -t TXT _amazonses.yourdomainname.com +short

Example :

Screen Shot 2017-05-08 at 4.10.36 PM
Step 1: Open the terminal box.

Step 2 : Paste the command or rule as shown below in the terminal box:

dig -t TXT _amazonses.yourdomainname.com +short

Step 3: Change the domain name section to your domain. In this example change it to :

dig -t TXT _amazonses.aexample.com +short

Step 4 :Press enter

It should return the value as given in the record i.e.

SAEv4IYBmDjdvfihfhsdbajsOeDHzW41x9TGiTk=

2) DKIM verification

dig -t CNAME 7p5lbjov2f3sunviooej3vhwmes37wm3._domainkey.yourdomainname.com +short

Example :Screen Shot 2017-05-08 at 4.15.06 PM
You shall receive 3 such CNAME records. Please follow the below process for all .

Step 1: Open the terminal box.

Step 2 : Paste the command or rule as shown below in the terminal box:

dig -t CNAME 7p5lbjov2f3sunviooej3vhwmes37wm3._domainkey.yourdomainname.com +short

Step 3: Update the command to include the CNAME record shared with you . In this example change it to :

dig -t CNAME 569osnkvhosyfsvkfn._domainkey.aexample.com +short

Step 4 :Press enter

It should return the value as given in the example record i.e.

569osnkvhosyfsvkfn.dkim.amazonses.com

3) SPF Verification

dig -t TXTyourdomainname.com +short

Example :Screen Shot 2017-05-08 at 4.19.46 PM
Step 1: Open the terminal box.

Step 2 : Paste the command or rule as shown below in the terminal box:

dig -t TXTyourdomainname.com +short

Step 3: Update the command to include your domain name. In this example change it to :

dig -t TXTaexample.com +short

Step 4 :Press enter

It should return the value as given in the example record i.e.

v=spf1 include:amazonses.com -all

4) Custom CNAME

dig -t cname email.yourdomainname.com +short

Example:Screen Shot 2017-05-08 at 4.17.04 PM
Step 1: Open the terminal box.

Step 2 : Paste the command or rule as shown below in the terminal box:

dig -t cname email.yourdomainname.com +short

Step 3: Update the command to include your domain name. In this example change it to :

dig -t cname email.aexample.com +short

Step 4: Press enter

It should return the value as given in the example record i.e.

d2kddif797w36.cloudfront.net

Few common things to look out for :

  1. Check if their domain is being added multiple times when saving the records. In some domain providers , the domain is automatically saved by the platform and you may not need to add the domain name again.

For example ,Screen Shot 2017-05-08 at 4.17.04 PM
Step 1: Open the terminal box.

Step 2 : Paste the command or rule as shown below in the terminal box:

dig -t cname email.yourdomainname.com +short

Step 3: Update the command to add your domain name twice. In this example change it to :

dig -t cname email.aexample.com.aexample.com +short

Step 4 :Press enter

It will return the value as given in the example record i.e.

d2kddif797w36.cloudfront.net

In this case , your domain is being appended or added twice and you need to remove the domain name while saving the record.

Please ensure that you do this check for all the TXT and CNAME records

2) In some cases, the issue with this step is that your Amazon SES account tries to verify the Domain and DKIM for 3 days after the creation of the DNS records. If you have not immediately proceeded with the verification process please access your Amazon SES account and check in the Domain Section accessible from the left menu and click on the domain name. If the verification has status failed, simply trigger the retry functionality for both the Domain and the DKIM to quickly get the verification notification.

NSLookUp Commands

Example Domain =yourdomainname.com

Open the terminal on your laptop and run the below commands to verify the propagation of the DNS records.

TXT Record Debugging

  1. nslookup -type=NSyourdomainname.com

Server: 202.323.298.00

Address: 202.132.218.#99

Non-authoritative answer:

yourdomainname.com nameserver = dns2.yourdomainname.com.

yourdomainname.com nameserver = dns1.yourdomainname.com.

  1. b) nslookup -type=TXT  _amazonses.yourdomainname.com dns1.yourdomainname.com

   ** server can’t find _amazonses.yourdomainname.com: NXDOMAIN

  1. c) Check if their domain is appending multiple times with below command.

nslookup -type=TXT  _amazonses.yourdomainname.com.yourdomainname.com dns1.yourdomainname.com

If you see the DNS value, it means the domain is being appended multiple times.

In that case, Update the DNS CSV without domain name in records.

E.g. Update  _amazonses instead of amazonses.yourdomainname.com

Follow the same process for other DNS records also.

Or

dig -t TXT _amazonses.yourdomainname.com +short

CNAME Records Debugging

  1. nslookup -type=NSyourdomainname.com
  2. nslookup -type=CNAME 7p5lbjov2f3sunviooej3vhwmes37wm3._domainkey dns1.yourdomainname.com

Or

dig -t CNAME 7p5lbjov2f3sunviooej3vhwmes37wm3._domainkey.yourdomainname.com +short

SPF Record Debugging

  1. Go to https://mxtoolbox.com
  2. Search your Domain
  3. Select SPF Record lookup from the dropdown
  4. You should see below amazon SES SPF record if it has been properly added.

nslookup -type=CNAME d2bnnhjmej5836.cloudfront.net  ns1.hostinger.in.     “v=spf1 include:amazonses.com ~all”
OR
dig -t TXTyourdomainname.com +short

Custom CNAME Debugging

nslookup -type=NSyourdomainname.com

nslookup -type=CNAME email.yourdomainname.com ns1.hostinger.in.

Or

dig -t cname email.yourdomainname.com +short

Updated on May 8, 2017

Related Articles