TXT Record (Text Record) (TXT Record)

Security Glossary - DNS

Definition: A TXT record allows domain administrators to store arbitrary text data in DNS. Originally intended for human-readable notes, TXT records are now primarily used for machine-readable verification and security data including SPF policies, DKIM public keys, DMARC policies, domain ownership verification, and various service-specific tokens.

The Importance of TXT Record

TXT records carry some of the most important security configurations for your domain. SPF records (which authorize email senders) are TXT records. DMARC policies are TXT records. DKIM public keys are TXT records. Google Search Console verification, Let's Encrypt DNS challenges, and many SaaS integrations use TXT records for domain ownership proof.

Because TXT records serve so many purposes, they can accumulate over time. Old verification records for services you no longer use, duplicate SPF records, or conflicting DMARC policies can cause problems. Having multiple SPF TXT records is a specific violation of the SPF specification and will cause authentication failures.

TXT record management requires attention to syntax. SPF records have a strict format with a 10-lookup limit. DMARC records must start with "v=DMARC1". Malformed records are silently ignored by receiving servers, meaning you might think email authentication is configured when it is actually broken.

How to Test for TXT Record

A DNS health checker shows all TXT records for your domain and validates their syntax. It checks that SPF records are properly formatted, DMARC is correctly configured, and there are no conflicting records. Regular auditing helps catch stale or misconfigured TXT records.

Key Parameters

Common TXT RecordPurposeExample
SPFEmail sender authorizationv=spf1 include:_spf.google.com ~all
DKIMEmail signature verificationv=DKIM1; k=rsa; p=MIGf...
DMARCEmail authentication policyv=DMARC1; p=reject; rua=mailto:...
Domain verificationProve domain ownershipgoogle-site-verification=abc123
Check DNS Health

TXT Record FAQ

Is there a size limit for TXT records?
A single TXT string can be up to 255 characters, but multiple strings can be concatenated in one record. The total UDP DNS response should stay under 512 bytes for compatibility, though EDNS0 and TCP fallback support larger responses. SPF records approaching the limit should be simplified.
Can I have multiple TXT records?
Yes, a domain can have many TXT records. However, you should only have one SPF record and one DMARC record. Multiple records for other purposes (domain verification tokens, etc.) are fine.
Disclaimer: DomainOptic provides automated informational scans only. Results do not constitute professional security advice, compliance certification, or a guarantee of security. Always verify findings independently.