trustyourinbox

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.

Verified 2026-11-26 against the official HostGator documentation.

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)

  1. Click Domains in the left menu.
  2. Open the DNS tab (Manage Advanced DNS Records).
  3. 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)

  1. Open cPanel and go to Domains, then Zone Editor.
  2. Click Manage next to the domain.
  3. 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., and yourdomain.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.

Start with one domain. See it with your own data.

Free for one domain, no card. Add one DNS record and the first reports usually arrive within a day.

  1. Monitoring
  2. Quarantine
  3. Reject