A TXT record stores text data in your domain's DNS settings, often used for email authentication (SPF, DKIM, DMARC) or to verify domain ownership with a third-party service. You can add a TXT record in a few minutes using cPanel or DirectAdmin.
Before you start
Check your welcome email or the client area to confirm whether your hosting plan uses cPanel or DirectAdmin, as the steps differ slightly. You will also need the exact TXT value supplied by the service you are setting up, such as an SPF string or a verification code.
This only works if your domain's nameservers point to Hostking's servers. If your domain uses Cloudflare or another external DNS provider, you must add the TXT record there instead.
cPanel
- Log in to cPanel and go to Domains, then open Zone Editor.
- Click Manage next to the domain you want to add the record to.
- Click the arrow next to Add Record and choose TXT Record.
- In the Name field, enter the subdomain (for example
www) or, for the root domain, the full domain name with a trailing full stop, for exampleexample.com.. The trailing full stop stops cPanel adding the domain again and creating an invalid name. - In the TTL field, enter a time-to-live value in seconds. If you are not sure, 14400 (four hours) is a commonly used default.
- Confirm the Type field shows TXT.
- In the Record field, paste the exact text value supplied by the service requiring it.
- Click Add Record to save.
The Zone Editor also lets you add records to addon domains and subdomains on the same account, using the same steps.
DirectAdmin
- Log in to DirectAdmin and go to Account Manager, then DNS Management.
- Select the domain you want to edit.
- Click Add Record.
- Choose TXT as the record type.
- In the Name field, enter
@for the root domain or the subdomain name if required. - In the Value field, paste the exact text data, for example an SPF string or verification code.
- Set the TTL. A value of 3600 seconds (one hour) is a commonly used default.
- Click Add to save the record.
Troubleshooting
- Record not found by the verification service: DNS changes can take up to 24–48 hours to propagate fully, though most appear within minutes. Wait a while before checking again.
- Verification fails even after waiting: double-check the TXT value was copied exactly, with no extra spaces or missing characters, as the record field does not warn you about invalid data.
- Record looks duplicated, such as
example.com.example.com: in cPanel, this happens if you forgot the trailing full stop after the domain name in the Name field. Edit the record and add the full stop. - Changes don't take effect at all: confirm your domain is actually using Hostking's nameservers rather than a third-party DNS service. If it isn't, add the TXT record with that provider instead.
- Multiple SPF records exist: most mail providers only read one SPF TXT record per domain, so merge values into a single record rather than creating two.
If you are still stuck after following these steps, contact Hostking support via live chat on the website or by opening a support ticket from the client area.