Most DNS records point somewhere. An A record points a name at an address, and an MX record points at a mail server. A TXT record is the odd one out: it points at nothing. It simply carries a piece of text, published in your DNS, for other machines to read and act on.
That modest job sits behind two things almost every domain owner eventually meets: proving to a service that you control your domain, and telling the world which servers are allowed to send your email. This guide explains what a TXT record holds, how those two jobs work, and how to read a TXT line field by field with the free DNS Record Formatter and Explainer on Ovatly, which works in your browser and never queries live DNS.
Contents
- Quick answer
- What a TXT record actually holds
- Job one: domain verification
- Job two: SPF and sending mail
- How to read a TXT record, step by step
- Worked example: reading a TXT line field by field
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
A TXT record stores text in your DNS for other machines to read. Its two classic uses are domain verification, where you publish a token a service gives you and the service reads it back as proof you control the domain, and SPF, where a TXT line starting with v=spf1 lists the servers allowed to send mail for your domain. To read one of your own records, paste the line into the DNS Record Formatter and Explainer and it will explain each field and validate the values. The formatter explains and validates what you paste; it does not write your SPF policy for you, and it never queries live DNS.
What a TXT record actually holds
TXT is one of the ten record types the formatter recognizes, alongside A, AAAA, CNAME, MX, NS, SOA, SRV, CAA and PTR. Where those types carry structured values such as addresses or hostnames, a TXT record carries free text: a string that means something to whichever machine comes looking for it.
Nothing about a TXT record affects where your website loads from or where visitors go. It is a notice board, not a signpost. A mail server, a verification checker or a security scanner reads the text and makes its own decision. That also means a TXT record can sit in your zone for years doing quiet work, and deleting the wrong one can break a verification or a mail check you forgot depended on it.
Job one: domain verification
Services often need to know that the person setting up an account really controls the domain involved. Email proof is weak, because mailbox access and DNS control are different things. So the service hands you a unique token, a random-looking string, and asks you to publish it as a TXT record on your domain.
When you have added the record, the service reads your DNS. Finding its token there proves the point, because only someone with access to your DNS settings could have published it. The record usually stays in place afterwards, so the service can re-check it later. This pattern shows up when you connect a domain to a mail provider, a search console, a hosting platform or a security service.
Job two: SPF and sending mail
SPF, the Sender Policy Framework, is the second classic job. An SPF record is a TXT record whose text starts with v=spf1, followed by the servers and services authorized to send email for your domain, and a closing rule for anything else.
When a message arrives claiming to be from your domain, the receiving server looks up your SPF record and compares the sending server against the list. A match supports delivery; a mismatch is evidence the message may be forged. SPF does not encrypt mail and does not guarantee delivery. It gives receivers a published statement of who may send for you, which is one signal among several they use.
How to read a TXT record, step by step
- Get the record as a line of text. Copy it from dig output or from your zone file, exactly as it stands.
- Open the DNS Record Formatter and Explainer and paste the line in. The tool accepts both dig order and zone-file order.
- Read the explanation field by field: the name the record sits on, the TTL, the type, and the text value itself.
- Check the validation result. If a value is malformed, fix it in the source and paste again before you rely on the record.
Worked example: reading a TXT line field by field
Here is a verification record in the same pasted format as a typical zone line:
example.com. 300 IN TXT "site-verification=8f3ka92md7xq"
Read it left to right. The name is example.com., the domain itself, which is where verification tokens usually live. The TTL is 300, meaning resolvers may cache this answer for 300 seconds. The class is IN, the standard internet class that appears on ordinary records. The type is TXT, which tells any reader the value is text. The value, in quotes, is the payload: the words site-verification= followed by the token the service issued. Nothing in the line points anywhere; the whole meaning sits in that quoted string, and the formatter confirms each field so you are not guessing which number is the TTL and which part is the value.
An SPF line reads the same way, with a longer value: the name and TTL up front, TXT as the type, and a quoted string beginning v=spf1 that lists the authorized senders.
Limitations and honest tradeoffs
The formatter reads only what you paste. It never queries live DNS, so it cannot tell you whether a record you wrote yesterday has actually been published or has finished propagating; it can only confirm that the line you hand it is well formed and explain what it says.
It also stops at explanation and validation. It will not compose an SPF policy, decide which senders you should authorize, or judge whether a verification token matches what a service expects. Those decisions need your knowledge of your own setup. And because the tool recognizes a fixed set of ten types, an unusual record type outside that set is reported as unrecognized rather than explained.
Common mistakes
- Deleting old TXT records during a tidy-up. Verification and SPF lines look like clutter and break things quietly when removed. Identify each one before touching it.
- Publishing the token with the wrong name. Verification tokens usually belong on the bare domain; putting one on a subdomain means the checker never finds it.
- Treating SPF as a delivery guarantee. SPF is one signal receivers use. A correct record helps legitimate mail, but it does not promise an inbox placement.
- Editing a record and testing too early. Cached answers live as long as the TTL. A checker may still see the old text for a few minutes after your edit.
- Assuming a pasted record is the live record. What you paste is what the tool explains. Confirm you copied the current version before drawing conclusions.
FAQs
What is a TXT record in plain terms? It is a DNS record whose value is a piece of text instead of an address. Other machines read that text and act on it, for example checking a verification token or an SPF policy. It does not point visitors anywhere.
How does domain verification with a TXT record work? A service gives you a unique token and asks you to publish it as a TXT record on your domain. The service then reads your DNS, finds the token, and accepts that you control the domain, because only someone with DNS access could have put it there.
What does an SPF record actually do? An SPF record is a TXT record starting with v=spf1 that lists the servers allowed to send email for your domain. Receiving mail servers read it and use it to judge whether a message really came from an authorized source.
Does the formatter check my live DNS? No. The DNS Record Formatter and Explainer reads only the lines you paste into it and never queries live DNS. To inspect a record, copy it from dig output or your zone file and paste it in.
Can the formatter write my SPF record for me? No. It explains pasted records field by field and validates their values, but your SPF policy, which servers you authorize, is yours to decide and write. The tool checks the shape of what you wrote, not the policy itself.
Conclusion
A TXT record is small but load-bearing: text in your DNS that other machines trust and act on, whether that is a verification token proving control or an SPF line naming your mail senders. The DNS Record Formatter and Explainer lets you read any of those lines field by field before you change or trust them. If a hosting move is coming up, our guide on preparing DNS changes before a hosting migration shows how to inventory records like these safely. For more guides in this series, see our Website and Webmaster Tools guides.
References
- Cloudflare Learning Center, on what a DNS TXT record is and what it stores: https://www.cloudflare.com/learning/dns/dns-records/dns-txt-record/
- RFC 7208, the Sender Policy Framework specification: https://www.rfc-editor.org/rfc/rfc7208