What is txt record

Last updated: April 1, 2026

Quick Answer: A TXT record is a DNS record type that stores text-based information associated with a domain, commonly used for email authentication (SPF, DKIM, DMARC) and domain verification purposes.

Key Facts

Understanding TXT Records

A TXT record is a type of DNS (Domain Name System) record that stores text-based information associated with a domain name. Unlike other DNS record types that serve specific technical functions, TXT records are highly flexible and can contain various types of text data defined by the record creator. TXT records have become fundamental to modern internet infrastructure, email security, and domain management practices.

TXT Records for Email Authentication

The most common and important use of TXT records involves email authentication protocols. SPF (Sender Policy Framework) records, stored as TXT records, specify which mail servers are authorized to send emails on behalf of your domain. DKIM (DomainKeys Identified Mail) records store public cryptographic keys for digitally signing outgoing emails, proving authenticity. DMARC (Domain-based Message Authentication, Reporting, and Conformance) records establish policies for handling authentication failures and provide reporting mechanisms. Together, these TXT-based authentication systems prevent email spoofing, improve email deliverability, and protect domain reputation.

Domain Verification and Service Integration

Web hosting companies, SSL certificate authorities, email service providers, and cloud services frequently require TXT record verification to confirm domain ownership. For example, when setting up Google Workspace, Microsoft 365, or other enterprise services, you may need to add specific TXT records containing verification codes. This verification process proves to the service provider that you control the domain. Once verified, you gain access to the service's features while protecting the domain from unauthorized access.

Managing and Adding TXT Records

TXT records are managed through your domain registrar's DNS management interface or your hosting provider's control panel. To add a TXT record, you specify the record name (typically @ for the root domain or a subdomain), select TXT as the record type, and enter the complete text value provided by the service. DNS changes typically propagate worldwide within 24-48 hours, though some changes take effect more quickly. You can verify TXT records using online DNS lookup tools, or command-line utilities like nslookup, dig, or host commands.

Security Considerations and Best Practices

TXT records play a crucial role in email security and domain reputation management. Properly configured SPF, DKIM, and DMARC records significantly reduce the likelihood that emails from your domain will be marked as spam or spoofed. Monitoring DMARC reports helps identify unauthorized email sources claiming your domain. Regularly auditing TXT records ensures security protocols remain current and that unauthorized records haven't been added to your domain through account compromise.

Related Questions

What is an SPF record?

An SPF (Sender Policy Framework) record is a TXT record specifying which mail servers are authorized to send emails for your domain. It prevents email spoofing by allowing receiving servers to verify that incoming emails genuinely originate from authorized sources.

How do I add a TXT record to my domain?

Log into your domain registrar's or hosting provider's DNS management panel, create a new DNS record, select TXT as the record type, enter the record name and text value provided by the service, and save. Changes typically propagate within 24-48 hours.

Why are TXT records important for email security?

TXT records enable critical email authentication protocols (SPF, DKIM, DMARC) that verify email legitimacy, prevent domain spoofing, improve email deliverability rates, and protect your domain's email reputation from being used for spam or phishing.

Sources

  1. Wikipedia - TXT RecordCC-BY-SA-4.0
  2. Wikipedia - Sender Policy FrameworkCC-BY-SA-4.0