TXT records: what they’re for and how to add one
TXT records hold text for other services to read: SPF, DKIM, DMARC and domain verification. How to add one without breaking email.
On this page
A TXT record publishes a piece of text on a DNS name. Other services look it up to check something about your domain.
yourdomain.co.uk. 3600 IN TXT "v=spf1 a mx ~all"What TXT records are used for
| Use | Name | Starts with |
|---|---|---|
| SPF (which servers may send your email) | @ | v=spf1 |
| DKIM (email signing key) | x._domainkey or a provider’s selector | v=DKIM1 |
| DMARC (email policy) | _dmarc | v=DMARC1 |
| Domain verification (Google, Microsoft, others) | Usually @ | A code the service gives you |
Adding a TXT record in DirectAdmin
- Open Account Manager › DNS Management and select your domain.
- Choose Add Record, type TXT.
- Name: as instructed — the domain itself for
@, or_dmarc, and so on. - Value: paste the text exactly. DirectAdmin handles the quote marks.
- Save.
Rules that matter
- Several TXT records can share a name. A verification code and an SPF record can both sit on
@. - Only one SPF record per name. Two
v=spf1records invalidate each other. Merge them instead. How to set up an SPF record - Copy exactly. A missing character in a DKIM key breaks signing.
- Long values (such as DKIM keys) may be split into several quoted strings; that’s normal.
Checking
dig yourdomain.co.uk TXT +shortIf it doesn’t work
These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.
- DNS changes not workingYou changed a DNS record and nothing happened. How to tell whether it’s caching, the wrong DNS provider, a naming mistake or a conflicting record.
- Domain not resolving: “This site can’t be reached”Fix DNS_PROBE_FINISHED_NXDOMAIN and ‘server not found’: check the domain is registered, nameservers are set, records exist and DNSSEC isn’t broken.
- Email stopped working after changing nameserversWhy mail stops when you move a domain’s DNS, and how to restore Microsoft 365, Google Workspace or old-host email records at Traxio.
Common questions
What is a TXT record?
A TXT record stores a piece of text in your DNS, which other systems then read. In practice it is used for email authentication (SPF, DKIM and DMARC) and for proving to a service like Google that you own the domain.
This is a general web-hosting explanation, not specific to Traxio.
Spotted something out of date or unclear? Tell us and we’ll fix it.