Back to Glossary
T

TXT Record

Definition

A DNS record type used to store text-based information, standard for email authentication.

Expanded Explanation

What Is a TXT Record?

A TXT record (Text record) is a type of DNS record that stores arbitrary text-based information associated with a domain. Originally designed to hold human-readable text, TXT records have become the standard container for machine-readable authentication and verification data. In the email world, TXT records are the home of two of the three core authentication standards: SPF records and DMARC records are both published as TXT records. DKIM public keys are also published as TXT records at specific subdomains.

TXT Records for Email Authentication

SPF TXT record: published at the root domain (yourdomain.com), specifies authorized sending servers. Example: v=spf1 include:sendgrid.net -all. DKIM TXT record: published at [selector]._domainkey.yourdomain.com, contains the public key for DKIM signature verification. DMARC TXT record: published at _dmarc.yourdomain.com, specifies authentication policy and report destinations. Each of these records is essential for a properly authenticated email sending infrastructure.

TXT Record Structure and Limits

A TXT record can contain multiple strings of up to 255 characters each. Multiple strings are treated as a single concatenated value for most purposes. Total TXT record length should stay under 4,096 characters. DNS has a practical size limit for records in a single UDP response, which can be an issue for very long SPF records that include many sending services. TXT records have a TTL (Time to Live) value like all DNS records — setting a low TTL (300 seconds) before making changes allows faster propagation.

TXT Records for Domain Ownership Verification

Beyond email authentication, TXT records are widely used for domain ownership verification. Google Search Console, Microsoft 365, and many other platforms ask you to add a specific TXT record to your domain to prove you control it — before granting access to domain-specific tools and features. This non-email use of TXT records is completely separate from authentication but shares the same DNS mechanism.

Checking TXT Records

You can query a domain's TXT records using dig TXT yourdomain.com or nslookup tools. EmailVerify.io's free tools at emailverify.io/tools provide easy-to-use checkers for your SPF, DKIM, and DMARC TXT records — no command line required. These tools parse the raw TXT record data and present it in human-readable format with explanations of what each element means and whether it's correctly configured.

Common TXT Record Issues

Multiple SPF records: a domain should have only one SPF TXT record. Having two causes SPF to fail (permerror). Incorrect syntax: a single character error can invalidate an entire authentication record. Stale records: adding a new sending service without updating the SPF TXT record, causing SPF failures for that service's email. Incorrect DMARC reporting addresses: using email addresses that can't receive XML reports, or that bounce, causing DMARC reporting to fail silently.