A DNS TXT record is a DNS entry that stores plain text against a domain name, so other services can read it. Today a TXT record is mostly used for two jobs: proving you own a domain (for Google, Microsoft 365 and similar services) and publishing email security rules such as SPF, DKIM and DMARC. If someone has asked you to "add a TXT record", this guide shows you what it is, what it looks like and exactly how to add and check one.
TXT record in one paragraph
A TXT (text) record is one of the standard DNS record types. It holds one or more strings of text, each up to 255 characters, published at a domain or subdomain such as example.co.za or _dmarc.example.co.za. DNS itself never acts on that text. Mail servers, verification tools and other systems look it up and decide what to do with it.
How a DNS TXT record works
Every domain has a DNS zone: a list of records that tells the internet where your website, email and other services live. An A record points to a server's IP address and an MX record says which servers accept your mail. A TXT record is different because it does not point anywhere. It simply publishes a note that anyone can read.
The process looks like this when a service checks your TXT record:
- You publish the text. You add the TXT record in the DNS settings for your domain, usually at your registrar or in your hosting control panel.
- A service asks for it. A mail server, Google Search Console or another tool queries DNS for TXT records at a specific name.
- DNS returns the strings. The authoritative nameservers for your domain answer with every TXT record at that name.
- The service interprets the value. A receiving mail server reads your SPF policy, or a verification tool compares the token with the one it gave you.
Because the record lives in DNS, only the person who controls the domain can create it. That is why a TXT record works so well as proof of ownership. If you manage your domain with us, the DNS editor that comes with our domain name registration lets you add TXT records yourself at no extra cost.
DNS TXT record format, explained field by field
Most DNS editors show the same handful of fields. Here is what each one means, using a typical SPF entry for example.co.za as the sample.
| Field | Example value | What it means |
|---|---|---|
| Name / Host | @ or example.co.za | Where the record lives. "@" means the root domain. Use a label such as _dmarc for a subdomain. |
| Type | TXT | The record type. Pick TXT, not SPF (the old SPF record type is retired). |
| Value / Content | "v=spf1 include:_spf.example.net ~all" | The text itself. Some panels add the quote marks for you. |
| TTL | 3600 | How many seconds resolvers may cache the answer before asking again. |
In raw zone file form the same TXT record looks like this: example.co.za. 3600 IN TXT "v=spf1 include:_spf.example.net ~all". You rarely need to type that format, but it helps when a support article or a lookup tool shows records that way.
Common TXT record examples you will see
Almost every TXT record you add will fall into one of the groups below. Each one sits at a specific name, so getting the host field right matters as much as the value.
| Purpose | Host / name | Example value (shortened) |
|---|---|---|
| SPF (who may send your mail) | @ | v=spf1 include:mail.example.net ~all |
| DKIM (email signing key) | selector._domainkey | v=DKIM1; k=rsa; p=MIIBIjANBgkq... |
| DMARC (policy and reports) | _dmarc | v=DMARC1; p=none; rua=mailto:dmarc@example.co.za |
| Google site verification | @ | google-site-verification=AbC123... |
| Microsoft 365 verification | @ | MS=ms12345678 |
| Other service checks | @ or a given label | A token supplied by the service, such as a payment or social platform |
Email records cause the most trouble, because a missing or broken SPF, DKIM or DMARC entry is one of the main reasons messages land in junk folders. Our guide on what a DNS SPF record is goes deeper on SPF syntax, and if your mail is already being filtered, read why business emails go to spam.
How to add a TXT record to your domain
The steps are much the same whichever panel you use. Below we use Plesk, the control panel on our hosting plans, with notes for registrar DNS editors.
- Find out where your DNS is hosted. TXT records must go where your domain's nameservers point. If your nameservers point to your web host, edit DNS there. If they point to your registrar, edit DNS at the registrar.
- Open the DNS editor. In Plesk, go to Websites & Domains, choose the domain, then open Hosting & DNS and DNS Settings. In a registrar panel, look for "Manage DNS" or "DNS records".
- Add a new record and choose TXT. Click Add Record and set the type to TXT.
- Enter the host. Leave it blank or use @ for the root domain. For DMARC enter _dmarc, and for DKIM enter the full selector label you were given.
- Paste the value exactly. Copy the text from the service without extra spaces or line breaks. Leave TTL at the default unless told otherwise.
- Save and apply. Plesk asks you to apply DNS changes. Then wait a few minutes before you click "Verify" in the service that asked for the record.
New records often show within minutes, but resolvers that cached an older answer can take up to the TTL to update. Our explainer on DNS propagation covers why some people see changes before others. Moving a domain to a new registrar at the same time? Copy all TXT records across before you start a domain transfer, so email checks keep passing.
TXT record lookup: how to check what is published
Before you call a service and say "the record is there", check what the world actually sees. You can run a TXT record lookup in three ways.
Command line
On Mac or Linux run dig TXT example.co.za +short. On Windows run nslookup -type=txt example.co.za. For DMARC, query _dmarc.example.co.za instead.
Online checker
Any free DNS lookup site will show TXT records for a name. Pick one that queries several resolvers so you can spot caching differences.
Your nameserver directly. The third way, and the one to use if the lookup returns nothing, is to query your authoritative nameserver with dig TXT example.co.za @ns1.yourhost.co.za. If the record shows there but not on public resolvers, it is a caching delay. If it does not show there either, the record was added in the wrong place.
DNS TXT record length limit and other rules
Most searches about TXT records ask about size. Here are the limits that actually matter in practice.
- 255 characters per string. A single string inside a TXT record cannot exceed 255 characters. Longer values, such as 2048-bit DKIM keys, are split into several quoted strings that the reader joins together. Many panels, including Plesk, split them for you.
- Total size. A TXT record can hold several strings, but very large answers are slower and can fail over some networks. Keep each record as short as the service allows.
- SPF has a 10-lookup limit. Each include, a, mx or redirect in an SPF record costs a DNS lookup, and more than ten makes SPF fail.
- Plain text only. Use straight quote marks, not curly ones pasted from a word processor, and no hidden line breaks.
- Several TXT records per name are fine. Verification tokens, SPF and other entries can sit side by side at the root.
Troubleshooting a TXT record that will not verify
| Symptom | Likely cause | Fix |
|---|---|---|
| Lookup shows nothing | Record added at a DNS host your nameservers do not use | Check your nameservers, then add the record in the right panel |
| Record shows as _dmarc.example.co.za.example.co.za | Panel appended the domain to a full name you typed | Enter only _dmarc in the host field |
| Verification says "token not found" | Extra space, missing character or old cached answer | Recopy the value, lower the TTL, wait and retry |
| SPF "permerror" | Two SPF records or more than ten lookups | Merge into one v=spf1 record and trim includes |
| DKIM fails after adding key | Key broken across lines or truncated | Paste the key as one value and let the panel split it |
If you are still stuck, our team can check the zone for you. Domains registered with us, including every .co.za domain name, come with free DNS management, so adding or fixing a TXT record is part of the normal service rather than a paid extra.
When you will need to add a TXT record
Most business owners only meet TXT records at a few moments: setting up new email, connecting Google Search Console, moving to Microsoft 365 or Google Workspace, or adding a marketing platform that sends mail on your behalf. Keep a simple list of every TXT record you add and why. When you change mail provider or tidy up DNS later, that list stops you deleting a record that something still depends on.
If you would rather not touch DNS at all, send our team the values you were given through the contact page and we will add them for you.



