What is a DNS TXT record?

There are several types of records - or Resource Records as they are called - in the Domain Name System (DNS). This page explains what the TXT record is and how it's used.

The purpose of a DNS TXT record #

The TXT record is one of the most free DNS records available. The format is very simple but it can contain all sorts of information, ranging from authentication for Google's Site Verification or alternatives to SPF records and many more.

While the format in DNS is simple, the content it can contain is not. For instance, for SPF (Sender Policy Framework), a unique format for the data is used inside the TXT record.

What does it mean if an MX record changes? #

In most cases, it's because an external service has requested either some kind of authorization that you control the domain name. For instance, if you want to add your site to Google's Indexing tools, one of the authentication methods is adding a custom TXT record.

Changes to the SPF records could indicate a new service is allowed to e-mail on behalf of your domain and should be treated with caution and skepticism to avoid anyone impersonating your e-mails.

The structure of a DNS TXT record #

Here's the TXT record of Oh Dear itself:

ohdear.app.		3600	IN	TXT	"v=spf1 a mx include:email.freshdesk.com -all"
ohdear.app.		3600	IN	TXT	"google-site-verification=jIujgqEVQyUbkwSXgE4227mQZPqdrcHsPymDWvt4pwI"
ohdear.app.		3600	IN	TXT	"have-i-been-pwned-verification=8c3c98faa5fbef9d7bce7b1dbb898d1d"

It contains our Sender Policy Framework settings (which determine who can send on behalf the ohdear.app domain) as well as our Google Site Verification and Have I Been Pwned domain verification.

The structure itself is fairly simple:

<host>          <TTL>   IN  TXT   <value>

The value portion can be wild-ranging though, depending on the service that's being referred to.

Was this page helpful to you? Feel free to reach out via support@ohdear.app or on Twitter via @OhDearApp if you have any other questions. We'd love to help!