Updated on:  
January 21, 2025

What is TXT record

A TXT record, or Text record, is a type of DNS record that allows domain owners to store plain text data in their domain’s DNS settings. It is commonly used for verification purposes and to provide additional information about the domain. For example, a TXT record can verify domain ownership for services like Google Workspace or Microsoft 365.

colourful collage of abstract shapes and stamp of seal

How does an TXT record work

When someone queries your domain’s DNS for TXT records, the DNS server responds with the text data stored in the record. Applications or services use this data to perform specific actions, such as verifying your domain or authenticating email messages.

For instance, if you’re setting up email authentication with SPF, you’ll create a TXT record with information about which servers are allowed to send emails on behalf of your domain. When someone receives an email from your domain, their email server checks your domain’s TXT record to verify that the sender is authorized.

TXT records do not redirect traffic or host services. Instead, they act as a way to communicate important information about your domain to other systems.

Understanding key components

TXT records are straightforward, but understanding their structure helps you use them effectively.

  • Domain Name: This is the domain or subdomain to which the TXT record applies. For example, it can be your main domain like “mybusiness.com” or a subdomain like “mail.mybusiness.com.”
  • Text Data: This is the actual content of the TXT record. It can contain plain text or structured data, such as SPF rules, DKIM keys, or verification codes. Each TXT record can store up to 255 characters per entry, but multiple entries can be combined.
  • TTL (Time to Live): This value determines how long DNS servers should cache the TXT record. A shorter TTL ensures updates are applied quickly, while a longer TTL reduces server load.

Examples

TXT records are commonly used in several scenarios that are essential for running a secure and professional domain.

  • If you are setting up Google Workspace for your domain, Google will ask you to add a TXT record to verify your domain ownership
  • Another common use is email authentication. If you want to prevent spammers from sending emails that appear to come from your domain, you can create an SPF TXT record.

How to check your TXT records

Checking your TXT records ensures they are set up correctly and functioning as intended. To view your TXT records, log in to your domain registrar or DNS hosting provider. Navigate to the DNS management section, where all your domain’s DNS records are listed.

In the list of DNS records, look for entries labeled as “TXT.” These will display the domain name, text data, and TTL. Verify that the information matches what your service provider or application requires.

You can also use external tools like MXToolbox or command-line utilities. Enter your domain name to see all associated TXT records.

Common problems and how to fix them

Issues with TXT records can lead to service interruptions or security vulnerabilities. Identifying and fixing these problems is key to maintaining your domain’s functionality and reputation.

  • Missing Records: If required TXT records are missing, services like email or domain verification will fail. Check the documentation from your service provider to ensure all necessary records are added.
  • Incorrect Text Data: Mistyped or incomplete data in a TXT record can cause errors. For example, an incorrect SPF rule may block legitimate emails. Always copy and paste the exact data provided by your service provider.
  • Conflicting Records: Multiple TXT records for the same purpose can create conflicts. For instance, having two different SPF records can cause email delivery issues. Consolidate the data into one record to resolve conflicts.
  • Propagation Delays: Changes to TXT records can take up to 48 hours to propagate. If updates don’t appear immediately, wait and verify again after propagation is complete.