Support article
TXT Record
A TXT Record (Text Record) is one of the record types in the Domain Name System (DNS) that allows administrators to insert text...
A TXT Record (Text Record) is one of the record types in the Domain Name System (DNS) that allows administrators to insert arbitrary text into a domain’s DNS record. This type of record is frequently used to provide additional information about a domain or to verify domain ownership with certain online services.
Common uses of TXT records:
- Domain ownership verification: Many online services, such as Google Search Console and other web analytics services, require domain owners to verify their ownership by adding a specific TXT record to their DNS. This record contains a unique value provided by the service to confirm that the user adding the record has administrative control over the domain.
- Email policy implementation: TXT records are used to implement and configure protocols that help reduce spam and email abuse, such as SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail), and DMARC (Domain-based Message Authentication, Reporting & Conformance). These records help verify that email messages come from authorized sources and can provide instructions on how to handle messages that fail these checks.
- SPF: Specifies which mail servers are authorized to send email on behalf of a domain.
- DKIM: Allows an organization to take responsibility for a message that is in transit. The TXT record contains the public key used to verify the message’s digital signature.
- DMARC: Defines the policy for handling emails that fail SPF and DKIM verification, providing additional instructions to improve protection against phishing and other types of email abuse.
- General information: Some services or applications may use TXT records to store user-configured information that needs to be publicly accessible but doesn’t fit any other standard DNS record type.
Format of a TXT record:
The TXT record simply consists of a text string that can contain any textual data. The structure in a DNS zone file might look something like this:
example.com. IN TXT "v=spf1 ip4:192.168.0.1 -all"
This example shows a TXT record used for an SPF record, which specifies that only the server with the IP address 192.168.0.1 is authorized to send emails on behalf of example.com, and that any other server should be treated as unauthorized.
Considerations when using TXT records:
- Security: Although TXT records can be useful for many configurations, it is important to be aware of security. Sensitive information should never be stored in a TXT record since it is publicly accessible.
- Size and length: TXT records have limitations in terms of length. Longer entries may need to be segmented into multiple text strings within the record.
TXT records are a flexible tool within the DNS system that provides a way to extend information about a domain and its associated policies in a standardized and accessible way.