The table below shows the commands used in Windows Command Line, Linux Terminal and Mac OS Terminal to query for the SPF, DKIM and DMARC records for a domain.
Follow the instructions below and substitute the word selector and domain with the corresponding DKIM selector and domain you would like to look up.
|Linux/Mac OS Commands
|nslookup -type=txt domain
|dig txt domain
|nslookup -type=txt selector._domainkey.domain
|dig txt selector._domainkey.domain
|nslookup -type=txt _dmarc.domain
|dig txt _dmarc.domain
Steps to query the command :
- Open Command prompt (Start > Run > cmd)
- Type “nslookup -type=txt” a space, and then the domain/host name. e.g. “nslookup -type=txt google.com”
- If an SPF record exists, the result would be similar to:
“v=spf1 ip4:220.127.116.11/19 -all”
- If there are no results or if there is no “v=spf1” property, then there is a problem retrieving the record for the domain, or one does not exist.
Example 1 :
Querying the SPF record for progist.in using nslookup. nslookup -type=txt progist.in
Example 2 :
Querying the DKIM key for example.com using dig. You will have to know the DKIM selector – key (For Example) – being used in order to query for the DKIM key.dig txt key1._domainkey.example.com
Querying the DMARC record for progist.in using nslookup.nslookup – type=txt _dmarc.progist.in