What are SPF records?
Sender Policy Framework (SPF) records give you the ability to create a list containing IP addresses (or subnets) that you authorize to send emails on your behalf. This makes it harder for malicious email senders to hide their identity and use your email server for fraud or spam. This will prevent your domain name from being spoofed when an email is received. Doing this will protect against phishing attempts coming from your domain, as well as “identity theft” through emails.
What is DKIM?
DomainKeys Identified Mail (DKIM) helps you ensure emails are not altered between the original and final destination. Each email is signed with a private key that’s validated by a public key set in the DNS of the final destination mail server. This way, if any modifications are attempted during transit for the email, the end user will know when checking.
How to set DKIM and SPF records in cPanel?
Luckily you can set both DKIM and SPF easily by using the following steps. Please note that you’ll need to be logged into cPanel.
First: Find the Email section on the home interface of cPanel
Second: Select “Email Deliverability”
This page will analyze the domains in your cPanel to see if there are any DNS issues that could affect your email functionality. If problems do exist, it will tell you which records are where problems exists.
Third: Select ‘Manage’ on your domain.
If available, you may also select ‘Repair’ to attempt to quickly fix your DNS records.
Fourth: Install the suggested DKIM record.
Note: You may be required to generate the DKIM key first.
Fifth: Install the suggested SPF record.
There is also a part of the Email Deliverability page that covers the rDNS of your host’s IP address, and provides you the value your rDNS should be set to. You can view and update your IP’s rDNS if needed from your client area.
How To Set SPF Without cPanel?
This can usually depend on what you are using for the DNS management of your domain name. However you will want to add (or modify an existing) TXT record for the domain. This TXT record for your domain will contain the SPF record details.
By default, you may want to enter for the TXT record:
Example SPF Record
v=spf1 mx -all
This will prevent any server from sending emails from your domain name, except the one that is listed in your MX record for your domain name. Here is what the SPF record means, broken down.
The v=spf1 part indicates what version of SPF is being used. This will usually affect what the SPF record would look like as a whole. For this we use spf1 for the version. The next part, mx, indicates that email coming from your domain, should be checked against the server listed in the MX record for your domain. Which ties into the last part, -all. This will prevent any mail from being sent from a server that is not listed in your SPF record.