How to Configure SPF, DKIM, and DMARC for Your Domain
If you send email using your business domain, properly configured email authentication can help receiving mail servers determine whether your messages are legitimate.
Three important technologies used for email authentication are SPF, DKIM, and DMARC.
Together, they help reduce domain spoofing, improve the ability of receiving systems to evaluate your messages, and support reliable email delivery.
Lagrange Point Media (LPM) provides DNS and email management tools through cPanel to help customers configure these records.
This guide explains what SPF, DKIM, and DMARC do, how to configure them, and how to identify common authentication problems.
1. Understanding Email Authentication
When you send an email, the receiving mail server performs several checks to determine whether the message should be accepted.
These checks may include:
-
Whether the sending server is authorized.
-
Whether the message has a valid cryptographic signature.
-
Whether the authenticated domain matches the visible sender's domain.
-
Whether the sending server has a good reputation.
-
Whether the message appears suspicious or unwanted.
SPF, DKIM, and DMARC address different parts of this process.
Important: Email authentication does not guarantee inbox placement. Receiving providers also consider reputation, spam complaints, message content, and other factors.
2. What Is SPF?
SPF stands for Sender Policy Framework.
It allows domain owners to identify which servers and services are authorized to send email using their domain in the SMTP envelope.
SPF policies are published as DNS TXT records.
For example, a business might send email through:
-
Its cPanel hosting server.
-
Microsoft 365.
-
Google Workspace.
-
A transactional email service.
-
An email marketing platform.
Each sending service may require specific SPF authorization.
An illustrative SPF record looks like:
v=spf1 include:example.com -all
This is an example only and should not be copied into your DNS.
Important: SPF validates the domain used for the SMTP envelope sender, not necessarily the email address displayed in the recipient's inbox.
3. Understanding SPF Record Components
An SPF record contains mechanisms and qualifiers that describe which senders are authorized.
Common components include:
v=spf1
Identifies the record as an SPF policy.
ip4:
Authorizes a specific IPv4 address or range.
include:
References another domain's SPF authorization policy.
-all
Indicates that senders not authorized by the policy should fail SPF evaluation.
~all
Indicates a soft failure for unauthorized senders.
Important: The correct SPF policy depends on your actual sending services.
Do not add mechanisms simply because they appear in an online example.
4. How to Check SPF in cPanel
If you use LPM-hosted email, cPanel provides an Email Deliverability interface that can help identify SPF configuration problems.
To access it:
-
Sign in to the LPM Client Portal.
-
Open your active hosting service.
-
Access cPanel.
-
Search for Email Deliverability.
-
Locate your domain.
-
Click Manage.
-
Review the SPF information.
If cPanel identifies a problem, it may display a recommended record or repair option.
Important: Before applying an automatic repair, verify whether your domain also sends email through external services.
Replacing an existing SPF record without accounting for those services can cause legitimate messages to fail authentication.
5. Adding or Editing an SPF Record
If you manage DNS through cPanel, SPF records can be configured using Zone Editor.
To update SPF:
-
Open cPanel.
-
Search for Zone Editor.
-
Click Manage beside your domain.
-
Locate the existing SPF TXT record, if one exists.
-
Review its contents.
-
Edit the existing record or add the appropriate TXT record.
-
Save your changes.
If your DNS is managed through Cloudflare, your registrar, or another provider, make the changes there instead.
Important: A domain must not publish multiple SPF policy records at the same hostname. If you use multiple sending services, their authorization requirements generally need to be incorporated into one valid SPF policy.
6. What Is DKIM?
DKIM stands for DomainKeys Identified Mail.
DKIM uses cryptographic signatures to help verify that an email was signed by a domain and that the signed portions of the message have not been modified.
The sending email system signs the message using a private key.
The receiving system retrieves the corresponding public key from DNS to verify the signature.
DKIM records are commonly published under a hostname containing:
._domainkey
For example:
selector1._domainkey.yourbusiness.com
The selector and record value depend on the email service.
Important: DKIM requires both a correctly configured signing system and a corresponding DNS record. Adding a public key to DNS does not automatically cause your email provider to sign messages.
7. How to Check DKIM in cPanel
For email sent through your LPM hosting server:
-
Open cPanel.
-
Navigate to Email Deliverability.
-
Locate your domain.
-
Click Manage.
-
Review the DKIM status.
-
Follow the displayed recommendations if necessary.
If cPanel manages your domain's authoritative DNS, it may be able to repair certain DKIM configuration problems automatically.
If DNS is hosted externally, you may need to copy the recommended record into that provider's DNS management interface.
Important: If you send email through Microsoft 365, Google Workspace, or another external service, use that provider's DKIM configuration instructions rather than assuming cPanel's DKIM record is sufficient.
8. Configuring DKIM for External Email Providers
Different email providers use different DKIM configurations.
For example:
Microsoft 365
Microsoft 365 commonly uses provider-specific CNAME records and requires DKIM signing to be enabled for the domain through Microsoft's administration tools.
Google Workspace
Google Workspace provides DKIM key generation and activation through its administration tools. Its configuration commonly uses a TXT record.
Other Email Providers
Transactional email and marketing services may provide TXT or CNAME records for domain authentication.
To configure DKIM:
-
Sign in to your email provider's administration interface.
-
Locate its domain authentication or DKIM settings.
-
Obtain the exact DNS record names and values.
-
Add the records at your authoritative DNS provider.
-
Allow DNS changes to become visible.
-
Complete the provider's verification or activation process.
Important: Do not reuse another provider's DKIM records or generate arbitrary values. The records must match the signing keys and configuration of the actual sending service.
9. What Is DMARC?
DMARC stands for Domain-based Message Authentication, Reporting, and Conformance.
DMARC builds on SPF and DKIM to help protect the domain displayed in the From address.
It allows domain owners to publish a policy requesting how receiving servers should handle messages that fail DMARC authentication.
DMARC also supports reporting mechanisms that can help identify systems sending email using your domain.
A DMARC policy is published as a DNS TXT record.
The hostname is typically:
_dmarc.yourbusiness.com
10. Understanding DMARC Policies
DMARC supports three primary policy settings.
p=none
Requests no DMARC-specific enforcement action.
This is commonly used when initially monitoring email authentication.
p=quarantine
Requests that messages failing DMARC authentication be treated as suspicious.
Receiving providers may place these messages in spam or apply other handling.
p=reject
Requests that messages failing DMARC authentication be rejected.
Important: DMARC policies are requests to receiving systems. Individual providers determine how they apply their own filtering and acceptance rules.
11. Creating a Basic DMARC Record
A simple monitoring policy looks like:
v=DMARC1; p=none
This record identifies a DMARC policy and requests monitoring without DMARC-specific enforcement.
To add it through cPanel:
-
Open Zone Editor.
-
Click Manage for your domain.
-
Add a new TXT record.
-
Enter
_dmarcas the hostname, using the format expected by your DNS interface. -
Enter the DMARC policy value.
-
Save the record.
Before adding a record, check whether a DMARC policy already exists.
Important: This basic example does not configure reporting. It also does not provide the same level of spoofing protection as a properly validated enforcement policy.
Do not create multiple DMARC policy records at the same hostname.
12. Understanding DMARC Reporting
DMARC supports reports that can help domain owners understand how their email is being authenticated.
One common reporting tag is:
rua=
This specifies an address where aggregate DMARC reports may be sent.
For example:
v=DMARC1; p=none; rua=mailto:dmarc@yourbusiness.com
This is an illustrative configuration.
Aggregate reports can contain information about:
-
Sending IP addresses.
-
Authentication results.
-
Domains used for authentication.
-
DMARC policy evaluation.
-
Message volumes.
These reports are typically machine-readable XML files.
Tip: Businesses that send significant amounts of email may benefit from a DMARC reporting service that organizes the information into readable reports.
Important: Only specify a reporting mailbox or service that is prepared to receive the reports. Some external reporting destinations require additional DNS authorization.
13. Understanding SPF and DKIM Alignment
DMARC introduces an important concept called domain alignment.
Alignment compares the domain in the visible From address with the domains authenticated through SPF or DKIM.
For DMARC to pass, at least one of the following must succeed:
-
SPF passes and its authenticated domain aligns with the visible From domain.
-
DKIM passes and its signing domain aligns with the visible From domain.
Both methods do not need to pass simultaneously.
For example, an email might pass SPF authentication but fail DMARC because SPF authenticated a different, unaligned domain.
Important: An SPF or DKIM pass by itself does not necessarily mean DMARC passes.
14. Why Email Forwarding Can Cause Authentication Problems
Email forwarding can complicate authentication.
When a message is forwarded, the forwarding server may not be authorized by the original sender's SPF policy.
As a result, SPF can fail at the final destination.
A valid, aligned DKIM signature may still allow the message to pass DMARC, provided the forwarding process has not modified the signed content in a way that invalidates the signature.
Some forwarding services use additional technologies, such as ARC, to help receiving systems evaluate forwarded messages.
Important: Forwarding problems are not always resolved by changing SPF records. The appropriate solution depends on the forwarding system and the recipient's email provider.
15. Configuring Authentication for WordPress Email
WordPress websites often send automated messages such as:
-
Contact form notifications.
-
Password reset messages.
-
Order confirmations.
-
Customer account notifications.
-
Appointment confirmations.
These messages may be sent through the hosting server or through a separate SMTP or email delivery service.
If your website uses an SMTP plugin connected to Microsoft 365, Google Workspace, or another provider, the domain's authentication configuration must account for that service.
Important: Installing an SMTP plugin does not automatically configure SPF, DKIM, or DMARC.
Those records must be configured according to the actual sending provider.
16. Using Multiple Email Sending Services
Some businesses use several services to send email.
For example:
-
Microsoft 365 for employee email.
-
A transactional provider for website notifications.
-
An email marketing service for newsletters.
Each service may have different domain authentication requirements.
When configuring multiple providers:
-
Identify every service that sends email using your domain.
-
Review each provider's authentication instructions.
-
Configure SPF authorization where appropriate.
-
Configure DKIM signing for each supported service.
-
Verify DMARC alignment.
-
Test outgoing messages.
-
Review authentication results.
Important: Multiple services can use separate DKIM selectors, but the SPF policy for a particular hostname must remain valid and must not be duplicated.
17. Understanding SPF Lookup Limits
SPF has a limit on the number of DNS-querying mechanisms and modifiers evaluated during an SPF check.
The standard limit is 10 DNS lookups.
Mechanisms such as include, a, mx, exists, and the redirect modifier can contribute to this limit.
Exceeding the limit can cause SPF evaluation to return a permanent error.
Important: Adding more services to an SPF record without considering the lookup limit can create authentication problems.
If your SPF configuration is complex, review it carefully rather than repeatedly adding new include entries.
18. Checking Whether Email Authentication Works
After configuring your records, verify that they're published correctly.
You can use:
Check the appropriate TXT or CNAME records for your domain.
You can also send a test email to a mailbox that allows you to inspect message headers.
Depending on the receiving provider, authentication results may show:
-
spf=pass -
dkim=pass -
dmarc=pass
These results indicate how that receiving system evaluated the message.
Important: Successful authentication does not guarantee inbox delivery, and a DNS record existing does not prove that outgoing messages are using it correctly.
19. Common SPF Problems
Multiple SPF Records
Publishing more than one SPF policy at the same hostname can cause authentication errors.
Missing Sending Services
A legitimate email provider may not be authorized.
Incorrect Syntax
A malformed SPF record may fail validation.
Too Many DNS Lookups
An overly complex policy may exceed the SPF lookup limit.
Wrong DNS Provider
You may be editing a DNS zone that isn't authoritative for your domain.
20. Common DKIM Problems
Missing DNS Record
The receiving system cannot locate the public key.
Incorrect Selector
The email signature references a selector that doesn't match the published record.
DKIM Signing Isn't Enabled
The provider may require an additional activation step.
Incorrect DNS Value
The published key may be incomplete or incorrect.
Message Modification
Changes to signed message content can invalidate a DKIM signature.
21. Common DMARC Problems
SPF and DKIM Pass, but DMARC Fails
The authenticated domains may not align with the visible From domain.
Legitimate Email Is Rejected
A restrictive policy may have been enabled before all sending services were configured correctly.
No Reports Are Arriving
The reporting address may be missing, incorrect, or not properly authorized.
Multiple DMARC Records
More than one DMARC policy record at the same hostname can prevent proper policy discovery.
22. Should You Use p=none, p=quarantine, or p=reject?
The appropriate DMARC policy depends on your email configuration and how confidently you've identified all legitimate sending services.
A common implementation process is:
-
Identify legitimate sending systems.
-
Configure SPF and DKIM.
-
Verify DMARC alignment.
-
Publish a monitoring policy.
-
Review authentication results and reports.
-
Correct problems affecting legitimate email.
-
Consider moving toward enforcement when ready.
A stronger policy can provide better protection against direct spoofing of your domain, but only when your legitimate email is properly authenticated.
Warning: Moving directly to p=reject without verifying your sending systems can cause legitimate business email to be rejected.
23. Understanding Email Deliverability and Server Reputation
Even with correctly configured SPF, DKIM, and DMARC, email may still be rejected or filtered.
Receiving providers also evaluate factors such as:
-
Sending IP reputation.
-
Domain reputation.
-
Spam complaints.
-
Message volume and patterns.
-
Suspicious links or attachments.
-
Previous sending behavior.
-
Recipient-specific filtering policies.
For example, a receiving provider may reject messages from an IP address because of its reputation, even when the message passes authentication.
Important: SPF, DKIM, and DMARC help establish authentication. They do not override receiving providers' reputation-based filtering systems.
24. Getting Help from LPM
If you're having trouble configuring SPF, DKIM, or DMARC, LPM can help investigate hosting-related DNS and email authentication issues.
Submit a support ticket through the LPM Client Portal.
Please include:
-
Your domain name.
-
Your email provider.
-
Any additional services that send email using your domain.
-
The authentication problem you're experiencing.
-
Any error or rejection messages.
-
Whether your DNS is managed through cPanel or an external provider.
Do not include account passwords or private DKIM signing keys in your support ticket.
LPM can assist with hosting-related configuration. External email providers may require additional settings or verification through their own administration systems.
Additional Resources: