If you’re an email marketer, chances are you already know what SPF records are. If you don’t, SPF (Sender Policy Framework) records are DNS (Domain Name System) entries that ensure only authorized email servers can send emails on behalf of your domain. Think of them as security guards who verify and ensure who can send emails on your behalf.
So, what could go wrong there? Well, you may have more than one SPF record.
But how do multiple SPF records affect you, and how do they happen? This guide will answer all your questions and provide a comprehensive solution. We’ll also explore how to check for and resolve SPF record issues to ensure optimal email security and deliverability.
What does having multiple SPF records mean?
Having multiple SPF records means more than one set of SPF records is listed in your domain’s DNS settings.
It’s important to note that, technically, a domain should only have one SPF record. If you need to include multiple listings, combine them into a single SPF record to ensure everything works correctly. It helps detect and prevent email spoofing and phishing attempts.
You may have an SPF record that looks like this:
v=spf1 include:_spf.google.com -all
This record tells everyone that only email servers listed in Google's SPF record can send emails, for example.com. All the others will be rejected.
See what an email marketing expert, Karen Grill, says about having multiple SPF records.
How do multiple SPF records get created?
Multiple SPF records can occur for a few reasons. They’re usually unintentional. Let’s dive into some common scenarios:
Accidental creation of duplicate records: Sometimes, businesses accidentally create duplicate SPF records. This can happen when changes are made to email settings without checking existing records.
Using different email service providers (ESPs): When using different email service providers (ESPs), each provider may require its own SPF record. This can lead to multiple SPF records being created. If you’re using two or more ESPs, it’s possible to have conflicting records.
Merging domains with SPF record management: When a company merges with another or acquires a new domain, it can lead to the creation of multiple SPF records. Each domain might have its own SPF record, and combining them can result in several records.
Why should you avoid multiple SPF records?
When you have multiple SPF records, it can confuse email servers. They won’t know which record to follow, leading to security issues and delivery problems. This confusion weakens your domain's protection against fake emails and makes it harder for real emails to reach their intended recipients. Some consequences of having multiple SPF records are:
Email servers can't verify your messages, leading to failed authentication.
Without proper authentication, your emails will likely be marked as spam.
Frequent SPF failures harm your email reputation as a sender, affecting email deliverability.
How to check for multiple SPF records
You can check for multiple SPF records using two methods. The first method is doing it manually via a terminal, and the second is using online tools.
Method 1: Manual method
On Mac or Linux
Step 1: Open the terminal
For Mac: Go to Applications > Utilities > Terminal.
For Linux: Search "Terminal" in your applications menu or press Ctrl + Alt + T.
Step 2: Run the command. Type: dig TXT yourdomain.com and press Enter.
Step 3: Check the results
Look for lines in the answer section. Each line that starts with v=spf1 indicates an SPF record.
If you see more than one v=spf1 line, you have multiple SPF records.
On Windows
Step 1: Search for "command prompt" or "PowerShell" in the start menu.
Step 2: Run the command, dig txt domain.com or nslookup -q=txt domain.com. Replace domain.com with the domain name you want to check and press Enter.
Step 3: You will see a list of TXT records associated with the domain. Check the results by reviewing the output for lines that start with v=spf1. Multiple lines mean multiple SPF records.
Method 2: Using online tools
Step 1: Visit an online SPF lookup tool like Mailmodo’s SPF record checker tool.
Step 2: Type your domain name (e.g., yourdomain.com) into the search box provided on the tool’s page.
Step 3: The tool will display the SPF records associated with your domain. If you see more than one record starting with v=spf1, you have multiple SPF records.
Here's how the results will look when you check using Mailmodo's SPF checker tool, as shown in the image below.
Both methods will help you identify if you have multiple SPF records and ensure proper email configuration.
How to fix multiple SPF records
If you find multiple SPF records on your domain, you need to combine them into one. This is done using the DNS management tools provided by your domain registrar or hosting service.
Let’s say your domain has these two SPF records:
1. TXT v=spf1 ip4:192.168.0.4 -all
2. TXT v=spf1 include:spf.example.com -all
Mail servers will ignore both of these because there can only be one SPF record per domain. To fix this, create a new single record that combines both. Your new SPF record would be:
TXT v=spf1 ip4:192.168.0.4 include:spf.example.com -all
Save this new record and delete the original two. Now, your SPF record setup is correct. It will start working once the DNS changes propagate. This usually takes less than an hour but can take up to one or two days, depending on the TTL and mail server caching.
After making this change, use an SPF record checker tool to verify it’s working.
Conclusion
Managing SPF records might seem tricky, but understanding how to handle multiple SPF records is crucial for maintaining email security and deliverability. Combining your SPF records into a single, well-structured record ensures that your domain’s emails are authenticated correctly and that you avoid potential issues with email servers. Remember to regularly check your SPF records and use tools to validate them, keeping your email communications secure and efficient.