TXT records are a way for you to provide text information about your domain; TXT records may contain all sorts of information about name servers, other networking infrastructure, or even customer accounts. The text can be either machine or human readable. There are also a couple of different kinds of TXT records that administrators commonly use. Here are a few:
- DKIM records: DKIM stands for DomainKeys Identified Email. DKIM records are used in validating emails during the process of them being sent. DKIM works using public keys that are added into your DNS zone. Many big email providers will give you these keys for you to enter into your zone as a TXT record.
- DMARC records: DMARC stands for Domain-based Message Authentication Reporting and Conformance; administrators use these records to handle different kinds of malicious emails. The DMARC record makes it easier to identify spam, for example, and what to do with these emails when they are found (for example, reject them and send a report).
- Site verification records: These are often used to prove ownership for a domain. For example, Google often requires that you can prove ownership of your domain before you can use some of their services. Google will then provide a specific string of text for you to add to your domain zone via a TXT record.
- SPF records: allows mail exchanges to know which hosts are authorized to send mail for a domain.
Originally, TXT records were meant to be human-readable. However, standardized formating now makes it possible for some systems to machine read them, too. But the format may vary widely from one organization to another and depending on the TXT record's purpose.
TXT records sometimes show the domain, then IN TXT
, and then the TXT value within quotation marks. It may also include a TTL (time to live).
In the TXT value, first you'll see the attribute, and then an =
sign, and then the value for the attribute.
For example:
host.example.com IN TXT "Hello World"
Here are some examples of different types of TXT values:
- For DMARC:
v=DMARC1;p=none;sp=quarantine;pct=100;rua=mailto:dmarcreports@example.com;
- For site verification:
google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8
- For SPF:
v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.123 a -all