SPF (Sender Policy Framework) is an email authentication system that uses DNS (Domain Name System) to check if a mail server is authorized to send emails from your domain.
Advantages of SPF
SPF helps protect your domain from spoofing. Spoofing is when third-parties send messages that appear to be coming from your domain name.
In this way, SPF works to ensure your email messages are delivered correctly. Through SPF, a remote mail server can check and make sure that the email sent from your domain (or a spoofed domain) is authorized to send emails via a DNS SPF record.
If it’s not – the message will end up in spam, and if it is – it will land in your recipient’s inbox.
It’s important to use SPF records in your domain’s DNS configuration to make sure your emails are delivered properly.
In short, SPF helps:
- Increase your email delivery
- Prevent domain impersonation and spoofing
- Increase your brand reputation
Keep in mind that SPF doesn’t check the From domain but instead looks at the Return-Path to verify the originating server.
The Return-Path is the email address where receiving servers send notifications of delivery problems to the sending servers, like bounces and errors.
SPF in action
Here’s how the email delivery looks like when using SPF:
Here’s how a generic SPF DNS record looks like:
v=spf1 ip4:35.212.54.194 +a +mx ~all
How to edit SPF records manually
If your domain name is hosted on a web hosting platform and you’d like to put in your own SPF record, you can follow the steps below.
Keep in mind that two SPF records can’t exist on a single domain name simultaneously.
On your web hosting account, log in to your control panel. In our example, we’re using the cPanel control panel.
Inside of cPanel, click on DNS Zone Editor under the Domains section:
Manage
Click Manage next to the domain you’re editing SPF the record for:
Edit SPF record
Next, find any existing SPF records on your domain:
Delete
Delete the existing SPF record and fill in your own SPF entry under the Record column.
Here is our example using a generic SPF record:
Add record
Click Add Record to save changes.