What Is SPF?
SPF stands for Sender Policy Framework. It is an email authentication standard that helps protect email senders and recipients from spam, spoofing, and phishing.
Although your emails may send successfully without an SPF record, adding it to your site’s DNS improves email deliverability.
What Is an SPF Record?
An SPF record is a type of TXT record that verifies that an IP address or a third-party email sender is authorized to send emails from the sending domain.
It essentially acts as a public list containing all the domains authorized to send emails on behalf of your domain. These could be your web hosting email servers or transactional email services like SendLayer.
Usually, the mail server you intend to use will generate the SPF record you need to add to your site’s DNS settings. This often comes as TXT records. However, some transactional email service providers use CNAME records instead.
You can authorize unlimited domains/IP addresses in your SPF rule. However, using only one SPF record for your domain is recommended to avoid conflict. If you use multiple mail servers, you’ll need to merge the SPF records from these providers.
Note: Want to learn about handling multiple SPF records? Please see WP Mail SMTP’s tutorial to learn how to merge multiple SPF records.
How Does SPF Record Work
When you send an email from your site, the receiving email server will check the existing SPF rule to confirm that the sending domain is authorized to send emails on your behalf.
If it finds the sending domain during the DNS lookup, the receiving mail server will mark it as a legitimate source and deliver the email to the user’s inbox.
If a domain doesn’t pass the SPF test, the receiving mail server might flag it as spam. However, it may not prevent the email from delivering to the user’s inbox.
SPF rules provide a means to verify sending domains. But it is ultimately up to the receiving email provider to decide how to handle emails that fail the test.