Table of Contents
It might shock you to learn that 80 to 95 percent of all cyberattacks begin with a phishing email. With artificial intelligence (AI) helping cybercriminals create more sophisticated attacks, it makes sense that the global cost of cybercrime will rise to $10.5 trillion by 2025.
Fortunately, you can take action to protect yourself, your brand, and your customers from even the most convincing phishing and spoofing attacks. That’s where authenticating your email with a properly formatted SPF record comes in. Continue reading for a full explanation of SPF records and how to create them.
A Sender Policy Framework (SPF) is a type of Domain Name System text record (DNS TXT) that allows senders to specify which IP addresses are authorized to send email on behalf of a particular domain.
Why is this important? SPF-protected domains are less attractive to fraudsters and are therefore less likely to be blocklisted by spam filters. This protection is especially important for custom domain email addresses, as they’re the least likely to receive it from Email Service Providers (ESPs).
SPF email authentication also improves email deliverability for messages coming from your server. Email deliverability refers to the chances your message will reach your recipients’ inboxes rather than getting redirected to their spam or junk folders.
By preventing bad actors from gaining access to your domain, you demonstrate to the recipient’s server that you are a safe source of information. This added reputability significantly improves the likelihood that people will see your messages.
The key components of a typical SPF record include:
A typical email SPF record will contain at least some of the following mechanisms:
It will typically also contain one of the following quantifiers to direct the server on how to manage messages:
You might also see a pass (+) or a neutral (?), but these quantifiers are rare because they tend to be less secure.
This TXT SPF record example shows how to combine those components:
Since email authentication can be technical and somewhat confusing, let’s break down the process of setting up an SPF record into five simple steps.
First, make a list of all the mail servers and IP addresses your organization uses to send emails on behalf of your brand. This list may include:
Need help finding the right addresses? You can contact your IT System Administrator or your ESP for a complete list of all the IP addresses associated with your account.
While most companies own many domains, they typically only use some of those domains to send email.
Creating email SPF records for all your domains—even those you don’t use for sending mail—helps reduce your risk by protecting your non-sending domains from spoofing.
Again, you can get this information from your IT System Administrator or your ESP.
You’ll want to rely on your IT team or ESP to handle the task of actually creating your SPF record. They’ll use the information you provide and the formula shown above to create a functional SPF record that meets your needs.
Your company’s IT or security team will then publish your new SPF record to DNS with the help of your DNS server administrator. ESPs will typically publish SPF records on your behalf, but if you don’t use one, you will have to do it yourself.
Here’s why that matters. The DNS record is what your system uses to map URLs to numerical IP addresses—specifically, to IP addresses authorized to send mail on your behalf. When you receive an email, the SPF record compares the sender’s IP address against the list of authorized IP addresses in the DNS record and responds accordingly.
This process is typically straightforward for companies that use hosting providers like GoDaddy and 123-reg. However, if your ISP is the one who administers your DNS record—or you’re unsure who’s responsible for this task—you can find out from your IT department.
Testing to make sure the SPF record is working as expected is an important step and should be completed before sending any email campaigns. We also recommend reviewing these pre-send optimization tips as well before hitting send.
Using an SPF check tool to test your completed record will show you what your audience sees, which is a complete list of authorized servers. If you notice one or more trusted IP addresses are missing, all you have to do is update the record to include them.
Not taking the time to properly format your SPF record can result in error messages and loss of domain credibility, which can affect your email marketing campaign.
Some of the most common errors you might encounter when creating SPF records include:
When setting up an SPF record, it’s important to check your work for errors using an SPF check tool and proofreading for syntax or formatting issues. This extra step can prevent serious issues later on.
Effectively manage new and existing SPF records for your domain by:
This section addresses common questions about SPF records, an essential part of email authentication.
An SPF record is used to protect email senders and recipients against spoofing, phishing, and spam attacks. It requires a mail server to verify an email’s IP address so malicious senders can’t pretend to deliver an email from a legitimate company’s domain. If the sender’s IP address matches the SPF record, the email is accepted. If it does not, the email is flagged as spam.
By keeping spammers from accessing your domain, you show your recipient’s server that you are a safe source of information, improving the chances people will see your messages.
Your SPF record should include the version one tag (v=spf1) and all the mechanisms needed to verify which host names and IP addresses are authorized to send messages from your domain. It should also have an “include” statement and an ~all tag or -all tag. Here’s an example of an SPF record in an email authentication:
“v=spf1 a MX include:spf.yourbusinessdomainname.com ~all”
There is no direct cost for creating and using an SPF record. It’s a standard email authentication technology that is publicly available and doesn’t require a paid subscription or service. The only cost might be related to your domain registrar’s DNS management fees if you need to modify your DNS settings to add the SPF record.
You can publish your SPF record in your registrar’s DNS control panel area. To access this control panel, you’ll need to log into your domain account at your host provider and navigate to the section to update your DNS records. It might be called something like “DNS management” or “name server management,” for instance. You can then select the domain for which you want to modify the records, add your SPF text to the TXT record, and publish.
You can then use an SPF record checker tool to analyze your domain’s DNS settings and ensure your SPF record is published correctly.
You should only have one SPF record on a single domain. The Internet Engineering Task Force (IETF) explicitly forbids multiple SPF records for a single domain. If a domain has more than one SPF record, all emails from that domain will receive a PermError and may end up in spam. If you need to include more than one SPF record for a domain, you can merge them into a single record.
At Validity, we aim to empower you with information and products you can use to launch an effective email marketing strategy. Knowing how to create a mail SPF record is an important step in improving both your security and your email deliverability.
For an easy, 30-minute breakdown of SPF email authentication and other authentication protocols, watch our on-demand webinar, “An Email Marketer’s Crash Course in DMARC, SPF, and DKIM.”