TXT record in cPanel: add, edit or delete it in Zone Editor

Print
  • 3

A TXT record stores a short piece of text in your domain's DNS. Services read it to confirm that you own the domain (Google, Microsoft, Facebook) and mail servers read it to check SPF, DKIM and DMARC. In cPanel you add it under Domains, then Zone Editor, with the Manage button next to the domain.

The Zone Editor only matters when the domain uses the TopHost nameservers ns4.tophost.md and ns5.tophost.md. If your DNS is with Cloudflare or another provider, add the record there.

Typical TXT records and their names

PurposeNameValue starts with
Domain verification (Google Search Console and others)example.md.google-site-verification= or the code of the service
SPF, the list of servers allowed to send your mailexample.md.v=spf1
DKIM, the public key that signs your mailselector._domainkey.example.md.v=DKIM1
DMARC, the policy for mail that fails the checks_dmarc.example.md.v=DMARC1

Use the exact name and value given by the service. The table only shows what they usually look like.

Adding a TXT record

  1. Log in to cPanel and open Domains, then Zone Editor.
    Zone Editor in the Domains section of cPanel
  2. Click Manage next to the domain.
  3. Click Add Record and set the type to TXT.
  4. In Name, enter the name the service asked for. When the record belongs to the bare domain, type its full name with a dot at the end, such as example.md.
  5. Paste the value into Record exactly as you received it, without extra spaces or your own quotation marks.
  6. Leave the TTL as suggested and save the record.

Editing or deleting a TXT record

In the Manage view, choose the TXT filter at the top. Each record has two buttons: Edit opens the fields for changes, which you confirm with Save Record; Delete removes the record after confirmation. Before deleting, copy the value somewhere: once removed, it cannot be restored from cPanel.

Rules worth knowing

  • One SPF record per domain. If you add a second service that sends mail for you, add it to the existing v=spf1 record instead of creating a new one. Two SPF records make both invalid. The details are in SPF and DMARC for your domain.
  • Other TXT records can live side by side. A verification code next to SPF is perfectly normal; do not delete one to add the other.
  • DKIM for TopHost mail is created by cPanel. You do not need to type it by hand; see DKIM in cPanel.
  • Long values such as DKIM keys must be pasted in full. A key cut off at the end will not validate.

Checking the record

DNS changes usually show within a few hours and at most within 24 to 48 hours. To see what the internet already sees, run in a terminal or the Windows command prompt:

nslookup -type=TXT example.md
nslookup -type=TXT _dmarc.example.md

If a service still cannot find the record after 48 hours, compare the name and value character by character, then open a ticket with the domain and the record you added.

Related articles

Was this answer helpful?