DomainKeys and SPF - Prevent identity spoofing.

This document contains information to protect your domain against identity spoofing, configuring SPF, DKIM and DMARC so that no one can send fake emails on behalf of your mailboxes.

Identity spoofing (spoofing) occurs when someone sends emails that appear to come from your domain, for example from ventas@tudominio.com, without using your server. With SPF, DKIM and DMARC well configured, the servers that receive those fake emails can reject them or send them to spam.

How do I notice that they are spoofing my domain?

  • You receive bounces or replies from emails that you never sent.
  • Clients or suppliers notify you that they received strange messages with your address.
  • Your legitimate emails start going to spam, because the domain lost reputation.

If your emails go out with your domain but do not appear in the Sent folder, they probably did not come from your account. Anyway, change the password of that mailbox just in case.

Before you start: confirm that DKIM and SPF appear as Valid in cPanel, in Email → Email Deliverability. The step by step is in the article DomainKeys for email sending.

Step 1: harden SPF

The SPF record that cPanel creates ends in ~all, which asks the recipient to distrust unauthorized servers, but without rejecting them. To have it reject them, change it to -all:

  1. Open Domains → Zone Editor and click Manage next to the domain.
  2. Find the TXT record that starts with v=spf1 and edit it.
  3. If you send email from other services (a mailing system, Google Workspace, your online store), add them with include:, as indicated by each provider.
  4. Change the ending ~all to -all and save.

Important: with -all, any server not listed in the SPF is rejected. Before changing it, make sure you have included all services that send email with your domain. If not, those emails stop arriving.

Step 2: activate DMARC protection

DMARC is what actually tells the recipient what to do with a fake email. Raise the policy gradually:

  1. Monitoring: start with p=none. Emails are not blocked and you receive reports in the mailbox of rua=.
  2. Quarantine: after a few weeks without problems with your legitimate email, switch to p=quarantine. Fake emails go to spam.
  3. Rejection: when you are sure, switch to p=reject. Fake emails are rejected and do not arrive.

Example of TXT record _dmarc.tudominio.com with rejection:

v=DMARC1; p=reject; rua=mailto:postmaster@tudominio.com

Step 3: check an email

  1. Send an email from your mailbox to a Gmail account.
  2. In Gmail, open the message, click the three dots and choose Show original.
  3. Check that SPF, DKIM and DMARC say PASS.

Frequent problems

  • I keep receiving bounces of emails I didn't send: they may keep arriving for a few days, while servers apply your new policy. If they persist with p=reject, open a ticket.
  • After switching to -all or p=reject, some legitimate emails don't arrive: they come from a service that is not in the SPF. Add it with include: or temporarily revert to ~all and p=none.
  • I use another company's DNS: the records work the same, but you have to create and edit them in that company's panel, not in cPanel.
  • DMARC reports arrive in compressed files difficult to read: this is normal. You can use a free DMARC report analysis service to view them in summary form.

If you believe your domain is being spoofed and you need help setting up protection, open a ticket from the client portal or consult via the site's online chat.

  • DomainKeys envio de correo electrónico, spf, prevenir robo identidad
  • 51 Users Found This Useful
Was this answer helpful?

Related Articles

How to send information from forms - FormMail

This article explains how to send form data to an email on your domain using FormMail Clone, the...

PHP Scripts - Activating PHP support for the service.

This document contains information on how to choose or change the PHP version for each domain...

I cannot view the images on my cPanel services subdomain

This document contains information to resolve the issue of images not displaying on a subdomain...

DomainKeys for sending email

This document contains information to verify and activate DKIM, SPF, and DMARC on your domain...

How to create a website using a builder

This document contains information to install SitePad Website Builder from Softaculous in cPanel...