What TXT records are used for
A TXT record holds text. It was made for notes, and today it carries most of the trust information of a domain:
- SPF (v=spf1 ...): which servers may send email for the domain.
- DKIM (v=DKIM1 ...): a public key that receivers use to check message signatures. It lives at selector._domainkey.
- DMARC (v=DMARC1 ...): the policy for mail that fails SPF and DKIM. It lives at _dmarc.
- Ownership checks: Google, Microsoft, Facebook, Apple, Atlassian and many other services ask you to add a TXT value to prove that you own a domain.
What the tool adds to the raw records
- Long values that are split into several strings are joined back into one.
- Each record is labeled: SPF, DMARC, DKIM, or a known verification type.
- SPF analysis: the mechanisms, the final all rule (-all, ~all, ?all or +all), and a count of the direct DNS lookups, because SPF allows at most 10.
- DMARC analysis: the policy, the subdomain policy, the percentage and the report addresses.
- The _dmarc record is looked up for you when you enter a domain, and the DKIM key if you give a selector.
The SPF rules that cause trouble
- Only one SPF record. A domain with two TXT records that start with v=spf1 fails the check. Merge them into one.
- At most 10 DNS lookups. The mechanisms include, a, mx, ptr, exists and redirect each count, and the includes bring their own lookups. More than 10 gives a permanent error. The tool counts the direct ones and warns you when you are close.
- End with an all rule. -all rejects mail from other servers, ~all marks it as suspicious. +all allows everyone and defeats the purpose of SPF.
- Avoid ptr. It is slow and discouraged.
The 255 character limit
A single string in a TXT record can have at most 255 characters. A longer value, such as a 2048-bit DKIM key, is stored as several strings in the same record, which DNS tools show as "first part" "second part". Readers join them without a space. When you add such a record at your DNS provider, many providers split it for you, and some ask you to do it. The character counter helps you check the length.
Tips
- You can look up any name, for example _dmarc.example.com or selector1._domainkey.example.com, by typing it in the box.
- Quote marks are part of the DNS format. Do not type them into some providers, which add them for you.
Related tools: the MX lookup, the DNS lookup and the DNS record checker. The DNS records guide covers all types.