Text (TXT) records are a type of DNS record used to associate descriptive text with a domain name. These records allow domain owners to store arbitrary textual information within the DNS that can be retrieved by querying DNS servers. TXT records serve a variety of purposes, including domain verification, email authentication, and providing additional information about a domain.

Key points about TXT records:

  1. Descriptive Information: TXT records are used to store plain text information associated with a domain. This text can include any kind of information, such as human-readable descriptions, verification codes, SPF records, DKIM records, etc.
  2. Domain Verification: Some services and platforms require domain owners to add specific TXT records to their DNS settings to verify ownership of the domain. This verification process is often used for setting up email services, website analytics, and other online services.
  3. Email Authentication: TXT records are commonly used for email authentication mechanisms such as SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail). SPF records specify the authorized mail servers that can send email on behalf of the domain, while DKIM records provide a way to sign email messages and verify their authenticity.
  4. SPF Records: SPF records in TXT format define the list of IP addresses or domains authorized to send email on behalf of the domain. SPF helps prevent email spoofing and helps recipient mail servers determine if incoming email is coming from an authorized source.
  5. DKIM Records: DKIM records in TXT format contain cryptographic signatures that are added to email headers to verify the authenticity of the sender’s domain. DKIM helps prevent email forgery and enhances email deliverability.
  6. Verification and Anti-Spam: Some email services use TXT records to verify domain ownership and enhance spam filtering and email deliverability.
  7. Character Limits: TXT records can contain up to 255 characters per string. If longer text needs to be stored, the data can be split into multiple strings.
  8. Formatting: TXT records are typically written in a human-readable format, and the information they contain can be interpreted by both humans and automated systems.
  9. Use Cases: In addition to domain verification and email authentication, TXT records can be used for other purposes, such as providing information for email services, copyright notices, privacy policies, and more.
  10. DNS Query: To retrieve the information stored in a TXT record, a DNS query is performed by specifying the domain name and the record type (TXT). The DNS server responds with the stored text information.

TXT records offer flexibility and versatility, making them a valuable tool for domain owners to provide additional context, authenticate email communication, and meet various DNS-related requirements.