What is a TXT record?
DNS is like a phone book for the internet. It turns a website name into a number that computers understand. Each entry is called a record.
A TXT record holds plain text. Think of it as a sticky note on your domain. Computers read the note to learn something about you.
Common uses:
- SPF: lists the servers allowed to send email for your domain. It helps stop fake emails.
- DKIM: a public key that proves an email really came from you.
- DMARC: tells others what to do with email that fails those checks.
- Domain verification: a code that proves to a service, such as a search tool, that you own the domain.
The service you are setting up will give you the exact text to paste.
Before you start
Edit DNS where your nameservers point. Copy your current records first so you can undo a mistake.
Add a TXT record
- Log in to the client area.
- Open the DNS zone editor for your domain.
- Choose to add a record.
- Set Type to TXT.
- In Name, type what the service told you. Use
@or your domain for the main name. For DKIM it is something likeselector._domainkey. - In Value (or TXT Data), paste the text exactly.
- Keep the default TTL. TTL is how long others may remember the answer.
- Click Save.
An SPF record looks like this:
v=spf1 include:spf.example.net ~all
Your real value comes from your mail provider.
Edit or delete
- Find the record in the list.
- Click Edit, change the text, and save. Or click Delete.
Warning: A domain should have only one SPF record. Two SPF records break the check. Edit the old one and do not add a second.
Tip: Do not add extra spaces or line breaks when you paste. Some editors want quotes around the text, and some add them for you.
Test it
nslookup -type=TXT example.com
This lists the TXT records for your domain. Changes can take a few hours to appear.
Quick recap
- A TXT record stores text that others can read.
- It is used for SPF, DKIM, DMARC and domain proof.
- Paste the value exactly as given.
- Keep only one SPF record.
- Test with
nslookup -type=TXT.