Table of Contents

About

txt records are DNS record where any text value can be stored.

They are used for multiple purposes such as:

  • Email authentication with
    • SPF to list the server that sends email
    • DKIM where the public key is stored to decrypt the email signature
    • DMARC where the actions that should be taken on bad email are set.
  • but also for domain ownership verification for instance:

Query

For instance, if we want to know:

  • the TXT record of google.com
  • on the nameserver ns2.google.com

you would DNS query the database record with nslookup and the following command:

nslookup -type=TXT google.com ns2.google.com