The table below shows the commands used in Windows Command Line and Mac OS Terminal to query for the SPF, DKIM and DMARC records for a particular domain.

Follow the instructions below and substitute the words selector and domain with the corresponding DKIM selector and domain you would like to look up.

Record |    Windows Command Line    |         Mac OS Terminal
-------|----------------------------|-----------------------------------
SPF    |nslookup  -type=txt domain  |dig txt domain
-------|----------------------------|-----------------------------------
DKIM   |>nslookup                   |dig txt selector._domainkey.domain
       |>set q=txt                  |
       |>selector._domainkey.domain |
-------|----------------------------|-----------------------------------
DMARC  |nslookup -type=txt          |dig txt _dmarc.domain
       | _dmarc.domain              |
-------|----------------------------|-----------------------------------

Example 1. Querying the SPF record for turingtrust.co.uk using nslookup.

nslookup -type=txt turingtrust.co.uk 

Example 2. Querying the DKIM key for ondmarc.com using dig. You will have to know the DKIM selector - "google" in our case - being used in order to query for the DKIM key.

dig txt google._domainkey.ondmarc.com 

Example 3. Querying the DMARC record for turingtrust.co.uk using nslookup.

nslookup - type=txt _dmarc.turingtrust.co.uk

Analysing Your DMARC Reports

Can't see a DMARC record in your domain? Start your 14-day free trial of OnDMARC today.


Did this answer your question?