TXT Records

A TXT record is a DNS record that maps a domain name to a string of text. For example, the dnscheck.co TXT record maps to v=spf1 include:amazonses.com include:_spf.protonmail.ch ~all.

You can look up TXT records yourself with the dig command, or with nslookup on Windows:

dig +short dnscheck.co TXT

That returns each TXT record's value:

"protonmail-verification=c10b6ca0064c1954c2cac6da0cded6be0d20d607"
"v=spf1 include:amazonses.com include:_spf.protonmail.ch ~all"
nslookup -type=txt dnscheck.co

That returns each TXT record's value:

dnscheck.co     text =

        "protonmail-verification=c10b6ca0064c1954c2cac6da0cded6be0d20d607"
dnscheck.co     text =

        "v=spf1 include:amazonses.com include:_spf.protonmail.ch ~all"

A domain name can have multiple TXT records. Besides its SPF record, dnscheck.co has one that proves to its email provider that it controls the domain.

TXT records are also called "text records," and are defined in RFC 1035.

DNS Check can monitor your TXT records, and notify you if they become unresolvable, or have a change in contents. For example, if your SPF record has a range of IP addresses added or deleted, DNS Check will automatically detect the change the next time it performs a lookup on that SPF record.

Fields

Here are the fields that make up a TXT record:

Field Description Example
Name A fully qualified domain name (FQDN). dnscheck.co.
Type The DNS record type. Always set to "TXT". TXT
Value A string of text "v=spf1 include:amazonses.com include:_spf.protonmail.ch ~all"

SPF Records

The most commonly used type of TXT record is an SPF record, which is used to specify which IP addresses are authorized to send email on behalf of a domain name. An SPF record is used as an example in the next section.

DNS Zone File Examples

Here's an example of how a TXT record which uses the example values from this page's Fields section looks in a DNS zone file:

; Name           Type  Value
dnscheck.co.     TXT   "v=spf1 include:amazonses.com include:_spf.protonmail.ch ~all"

The Name ends in a period in the above example, so it's a fully qualified domain name.

Alternatively, you can create a TXT record that's relative to the zone file's $ORIGIN. Here's an example of how to do this using the example values from this page's Fields section:

$ORIGIN dnscheck.co.
; Name           Type  Value
@                TXT   "v=spf1 include:amazonses.com include:_spf.protonmail.ch ~all"

Additional Resources


DNS monitoring illustration

Protect your DNS infrastructure with automated monitoring

Get notified immediately when DNS records change. Start monitoring your critical DNS infrastructure for free in under 5 minutes.

No credit card required • Cancel anytime