Adding DMARC, SPF, and DKIM records in HostGator
HostGator has two DNS editors: one in the Customer Portal for domains registered with HostGator, and the cPanel Zone Editor for hosting accounts. This guide shows how to tell which one you need and where the TXT record goes in each.
Before you start: check your nameservers
HostGator's DNS editors only change what the internet sees if your domain uses HostGator nameservers. Look them up:
dig +short NS yourdomain.com
HostGator nameservers end in hostgator.com (for example ns8457.hostgator.com), hostgator.in, or hostgator.com.br. HostGator lists yours in the Customer Portal. If your nameservers point to another provider, edit your records there instead.
Step 1: Open the right DNS editor
Sign in at hostgator.com/my-account/login. Then pick the path that matches your account:
- You registered the domain with HostGator: use the Customer Portal.
- The domain runs on a HostGator hosting account with cPanel: use the cPanel Zone Editor.
Customer Portal (domains registered at HostGator)
- Click Domains in the left menu.
- Open the DNS tab (Manage Advanced DNS Records).
- Click + Add Record, choose Single record, then choose TXT.
In the older portal view the path is Domains, the domain, Advanced Tools, Manage next to Advanced DNS Records, Continue, then + Add Record.
cPanel Zone Editor (hosting accounts)
- Open cPanel and go to Domains, then Zone Editor.
- Click Manage next to the domain.
- Click + Add Record and select TXT from the Type dropdown.
Step 2: Add the TXT record
Enter the name and the TXT value, then save (Save Record in cPanel, Add in the portal). The examples below use cPanel's Name field, which takes the full name ending in your domain, with a trailing dot. HostGator does not document the portal's field names, so there, enter the same host and value where the form asks for them.
DMARC
Type: TXT Name: _dmarc.yourdomain.com. TXT value: v=DMARC1; p=none; rua=mailto:you@yourdomain.com
Start at p=none, then move past p=none once your reports are clean.
SPF
Type: TXT Name: yourdomain.com. TXT value: v=spf1 include:_spf.yourprovider.com ~all
Keep a single v=spf1 record. If the zone already has one, edit it to add your sender instead of adding a second record.
DKIM
Type: TXT Name: selector._domainkey.yourdomain.com. TXT value: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG... (your full public key)
Paste the whole key as one value.
MTA-STS pointer
Type: TXT Name: _mta-sts.yourdomain.com. TXT value: v=STSv1; id=20261126000000
Pointer only. The policy file is served over HTTPS at mta-sts.yourdomain.com; you publish that file yourself, and the MTA-STS tab in trustyourinbox shows the exact file. TLS-RPT (_smtp._tls) is the same shape.
HostGator quirks that bite
- Two editors. Use the Customer Portal for a domain registered at HostGator and the cPanel Zone Editor for a hosting account.
- Zone Editor needs HostGator nameservers. HostGator says the cPanel Zone Editor only works when the domain uses HostGator's nameservers.
- Full names in cPanel. The Name field takes the whole name, such as
_dmarc.yourdomain.com., andyourdomain.com.for the root. - Allow time. HostGator says portal DNS changes take 0 to 4 hours.
Step 3: Verify it published
dig +short TXT _dmarc.yourdomain.com dig +short TXT yourdomain.com | grep spf1 dig +short TXT selector._domainkey.yourdomain.com
Or paste the hostname into dns.google with type TXT. The record is live the moment the lookup returns it.
trustyourinbox picks it up by itself
If you copied the record from a trustyourinbox page, leave that page open. It watches public DNS and updates itself once the record is live. Otherwise, each protocol tab (DMARC, SPF, DKIM, MTA-STS) has a Scan now button. Click it once the lookup returns your record.
Fix DNS issues with one click. See the exact change before it goes live.
Click the fix. We email you the exact record, wait five minutes, write it to Cloudflare or AWS Route 53, and read it back from public DNS. On any other DNS host, you get the record and a link to the right page. Included on every plan.
Was this page helpful?
Keep reading.
- Run a free DMARC auditPaste your domain and read your published SPF, DKIM, and DMARC back in plain English.
- How we change DNS safelyThe safety layers behind an automated fix, and why a hand edit deserves the same care.
- DMARC record builderAnswer a few questions and get the exact _dmarc value to paste in.
- Editing DNS at any providerNot actually on HostGator? The universal walkthrough finds your real DNS host.