What is a TXT Record in DNS?

A TXT (Text) record is a type of DNS record that lets a domain administrator enter arbitrary text into the DNS. While originally intended for human-readable notes, today they are predominantly used to hold machine-readable data for security and verification purposes.

Verify your TXT Records

Did you just add a site verification code or update your SPF policy? Check your active text strings.

Check TXT Records Online

Common Uses for TXT Records

Because TXT records can hold almost any string of text, they have become the standard method for proving you own a domain, and for fighting email spam. The most common use cases include:

  • Domain Verification: Services like Google Search Console, Microsoft 365, or GitHub require you to add a unique TXT string (e.g., google-site-verification=...) to prove you control the DNS zone.
  • SPF (Sender Policy Framework): A TXT record starting with v=spf1 lists the IP addresses and servers authorized to send email on behalf of your domain.
  • DMARC (Domain-based Message Authentication, Reporting, and Conformance): Published on a specific subdomain (_dmarc), this TXT record tells receiving servers what to do if an email fails SPF or DKIM checks.
  • DKIM (DomainKeys Identified Mail): Holds the public cryptographic key used to verify that an email was not tampered with in transit.

TXT Record FAQ & Limitations

Yes, a domain can have many TXT records. When a DNS resolver queries your domain, it will return all of them. However, specific protocols have strict rules. For example, you can have multiple TXT records for verification, but you must only ever have exactly one SPF record.

A single string in a TXT record can hold up to 255 characters. If you need to store more data (which is very common for long DKIM keys), the DNS protocol allows you to split the data into multiple strings within the same record. The receiving server will automatically concatenate (join) them together.

No. If you publish two TXT records that both start with v=spf1, email providers will instantly fail your SPF check. You must combine all your authorized sending sources (like Google Workspace, Mailchimp, and Zendesk) into a single SPF string.