DNS - TXT record

Table of Contents


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

They are used for multiple purpose 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:


For instance, if we want to known:

  • 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

Powered by ComboStrap