Skip to content
Technology for businesses since 2008

Help center · Email

Email going to spam: how to enable SPF, DKIM and DMARC in cPanel

When a domain’s email ends up in the recipient’s spam folder, the most common cause is that the recipient’s provider can’t confirm the message was really sent by you. Three DNS records on your domain solve this: SPF states which servers are allowed to send email on behalf of the domain, DKIM signs each message, and DMARC tells the recipient what to do when one of those two checks fails.

This article explains what each one does, how to check whether they’re already active, and how to enable them in cPanel. Enabling all three greatly improves the chances of delivery, but it doesn’t guarantee it: the message content and the server’s reputation also matter.

What are SPF, DKIM and DMARC?

Record What it does Where it lives
SPF Lists the servers authorized to send email for your domain TXT record in the domain’s DNS
DKIM Signs the message with a key; the recipient checks the signature TXT record in the DNS, with the public key
DMARC Sets the policy: deliver, send to spam, or reject whatever fails SPF and DKIM TXT record at _dmarc.yourdomain.com

Think of it this way: SPF is the list of authorized senders, DKIM is the seal on the message, and DMARC is the instruction on what to do with messages that arrive without being on the list or without a seal.

Step 1: check whether they’re already active

Before changing anything, check what’s already there.

  1. Access the cPanel for your hosting account.
  2. In the Email section, click Email Deliverability.
  3. Find your domain in the list. The status column shows whether SPF and DKIM are valid or have a problem.

Another option is to send a test message from your address to an account with another provider (Gmail, Outlook), open the message and view its details (“Show original” in Gmail). The header shows whether SPF, DKIM and DMARC passed or failed.

Step 2: enable SPF and DKIM through cPanel

When the domain uses your hosting’s DNS, cPanel sets up both automatically.

  1. In Email Deliverability, click Manage next to the domain.
  2. If SPF or DKIM shows as invalid or missing, cPanel displays the suggested record.
  3. Click Repair (or Install the suggested record) and confirm.
  4. Wait a few minutes, then return to the list to see whether the status has changed to valid.

The SPF record looks like this (the exact content varies by server, so use what cPanel suggests, not this example):

v=spf1 +a +mx +ip4:000.000.000.000 ~all

Two points to watch:

  • A domain must have only one SPF record. Two v=spf1 records invalidate each other.
  • If you also send email through another service (email marketing tool, store system, form), that service must be included in the SPF record. The service itself provides instructions on how to include it.

Step 3: if your DNS is hosted elsewhere

If the domain uses DNS from another provider (for example Registro.br, the Brazilian domain registry, or Cloudflare), cPanel can’t write the records. In that case:

  1. In Email Deliverability, click Manage and copy the suggested record (the name and the value).
  2. Log in to the DNS panel of the provider that manages your domain.
  3. Create a TXT record with the same name and the same value.
  4. Save and wait for propagation, which can take anywhere from a few minutes to a few hours.

Step 4: create the DMARC record

cPanel doesn’t create DMARC by default. You add a TXT record to the domain’s DNS:

  • Name: _dmarc
  • Type: TXT
  • Initial value, for monitoring only:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com

Replace dmarc@yourdomain.com with an address you check. With p=none, nothing changes for delivery: you just start receiving reports from whoever sends email on behalf of the domain. After a few weeks without surprises, the policy can be tightened to p=quarantine (send to spam) and later p=reject (reject). Make this change gradually, so you don’t block legitimate emails from a service you forgot to include in the SPF record.

To create the record in cPanel itself, when DNS is hosted with us, use Zone Editor (in the Domains section), click Add Record and fill in the name and value.

Step 5: test again

  1. Send a message from your address to a personal account with another provider.
  2. Open the message and check the details to see whether SPF, DKIM and DMARC appear as approved (“pass”).
  3. Confirm that it arrived in the inbox, not the spam folder.

If it still lands in spam

With all three records valid and the message still going to spam, check:

  • The content. All-caps subjects, many links, large images and little text count against you.
  • Replies from the recipient. People who have never replied to your address are more likely to get your message in spam. Asking them to add you to their contacts helps.
  • Bulk sending. Large lists, or identical messages sent to many people at once, damage the server’s reputation.
  • Compromised account. An account with a leaked password may be sending spam without you knowing. Change the password of your email accounts.

If none of this solves it, contact us: with a sample of the message and the full header, our team can see where the verification failed.

Frequently asked questions

What happens if I don’t set up SPF, DKIM and DMARC?

Email still gets sent, but major providers treat messages without these checks with more suspicion. The result is more messages in spam or rejected.

Do I need to set up all three?

Ideally, yes. SPF and DKIM are the foundation, and cPanel usually enables them from the panel. DMARC completes the protection and gives you visibility into who uses your domain.

How long does it take to take effect?

DNS records can take anywhere from a few minutes to a few hours to propagate. If the test still fails shortly after, wait a bit and try again.

Can I have more than one SPF record?

No. More than one SPF record on the same domain makes the verification fail. If you use other sending services, include all of them in a single record.

Is DMARC with p=reject safe to start with?

No. Start with p=none, review the reports, and only raise the policy when you’re sure all legitimate services pass the checks.

Does this also apply to emails from my website’s forms?

It does. Emails sent by WordPress forms, for example, also need to pass the domain’s SPF and DKIM checks. Using an address from your own domain as the sender usually helps.

More on Email

See all →

Help center

Looking for something else?

See all tutorials, organized by topic.