Skip to content
English
  • There are no suggestions because the search field is empty.

What is an SPF record & how to set it? Free SPF Record Generator

Learn what an SPF record is, why it matters for email deliverability, and how to create and set up your own SPF record using the free Warmy SPF Generator.


  🎧 Prefer to listen? Hit play to hear this article read aloud. 



If you've ever had emails land in spam or worried about scammers impersonating your domain, you need an SPF record.

SPF (Sender Policy Framework) is a simple DNS setting that tells email providers which mail servers are allowed to send emails from your domain. It's one of the most important steps you can take to protect your reputation and improve email deliverability.

In this guide, you'll learn what SPF is, how it works, and how to generate and set up your own SPF record in minutes using the free Warmy SPF Generator.

In This Article

  1. What is an SPF record?

  2. How does an SPF record work?
  3. What are the benefits of using an SPF record?
  4. Introducing Warmy SPF Generator.
  5. How to set up an SPF record?
  6. How to check if your SPF record works correctly?

What is an SPF record?
An SPF record is a type of DNS record that lists all the mail servers authorized to send emails on behalf of your domain.

Think of it like a guest list for a private party. If a server isn't on the list, email providers know something might be off and can block or flag the email.

This helps prevent email spoofing; when scammers send emails that look like they come from you, tricking your customers or partners


How does an SPF record work?
When someone receives an email from your domain, their email provider checks your SPF record. Here's what happens:

1. The recipient's mail server looks up your domain's SPF record.
2. It checks if the server that sent the email is on your authorized list.
3. If it is, the email is delivered to the inbox.
4. If it isn't, the email may be blocked or flagged as spam.

It's a quick verification step that happens in the background every time you send an email..

What are the benefits of using an SPF record?

There are several benefits to using an SPF record, including:

• Protects your domain from spoofing: SPF records can help to protect your domain from being used by scammers to send spoofing emails. This can help to protect your reputation and prevent your customers from being scammed.

• Improves email deliverability:
 Mail servers are more likely to deliver emails from senders who have set up SPF records. This is because SPF records help to verify that emails are coming from a legitimate sender.

• Reduces the amount of spam:
SPF records can help reduce the amount of spam that is sent to your customers. This is because mail servers are more likely to block spam that is not authorized by the sender's domain.

Works with DKIM and DMARC: SPF is one piece of the email authentication puzzle. Combined with DKIM and DMARC, it gives you complete protection.

Tip: SPF, DKIM, and DMARC work together. Think of SPF as verifying who sent the email, DKIM as verifying the email hasn't been tampered with, and DMARC as telling providers what to do if checks fail. 


Introducing Warmy SPF Generator

Creating an SPF record from scratch can be confusing, especially if you're not a technical expert. That's why we built the Warmy SPF Generator.

This free tool lets you generate a correct SPF record in just four simple steps:

1. Enter your domain: Type in the domain you want to protect.
2. Choose your Email Service Provider (ESP): Select the platform you use to send emails (like Gmail, Outlook, or your own mail server).
3. Provide your email address: So we can send you the record if needed.
4. Generate your SPF record: The tool creates a ready-to-use SPF record for you.

 It's fast, accurate, and eliminates the guesswork. You can try it at the Warmy SPF Generator page. 



It's fast, accurate, and eliminates the guesswork. You can try it at the Warmy SPF Generator page.


How to set up an SPF record?
Once you have your SPF record, you need to add it to your domain's DNS settings.

Get Your SPF Record
To set up an SPF record, you will need to add a TXT record to your domain's DNS settings. The specific format of the SPF record will depend on your mail server. However, all SPF records must start with the following line:

v=spf1

This tells the recipient's mail server that the record is an SPF record and that it is using version 1 of the SPF standard.

After the v=spf1 line, you can add one or more mechanisms to your SPF record. Mechanisms specify which mail servers are authorized to send email from your domain. There are several different types of mechanisms, including:

• ip4: Specifies an IPv4 address that is authorized to send email from your domain.
• ip6: Specifies an IPv6 address that is authorized to send email from your domain.
• a: Checks the A record of your domain to identify authorized mail servers.
• mx: Checks the MX record of your domain to identify authorized mail servers.
• include: Includes the SPF record of another domain.
• redirect: Redirects the SPF check to another domain.

For example, the following SPF record specifies that only the mail servers at mail.example.com and mail2.example.com are authorized to send email from example.com:

v=spf1 a mx include:other-domain.com -all

This record includes the SPF record of other-domain.com and rejects all other emails.
An SPF record looks like this:

v=spf1 ip4:111.22.333.0/24 -all

where v — SPF version, always takes the value v=SPF1;

ip4 — IP address from which sending emails is allowed;

-all - mechanism for working with letters sent from other IP addresses.

This SPF record is simple and very strict. It allows emails to be sent only from the specified IP. All other messages should be blocked, as specified by the "-all" mechanism.

Access Your DNS Settings
Log in to your domain registrar or hosting provider (like GoDaddy, Namecheap, Cloudflare, or your web host). Look for the DNS management section. 

Add a New TXT Record
1. Create a new record of type TXT.
2. In the Name or Host field, enter @ or your domain name.
3. In the Value or Data field, paste your SPF record.
4. Save your changes.

Wait for Propagation
DNS changes can take anywhere from a few minutes to a few hours to take effect. This is called "propagation." Be patient,  it's normal.


How to check if your SPF record works correctly?
After setting up your SPF record, it's important to verify it's configured correctly.

If your mailbox is connected to Warmy, you can run the built-in Comprehensive DNS Test directly from the platform. No third-party tools needed. This test checks your SPF, DKIM, and DMARC records all at once.

Each month, you receive a set of credits to run these tests, the number depends on your subscription tier.

For full details on how to run the test and interpret the results, check out this article: Comprehensive DNS Test


 
Common SPF Record Mistakes to Avoid

One record per domain, You can only have one SPF record per domain. If you add multiple records, mail servers won't know which one to trust and may reject your emails.

10-DNS-lookup limit:  SPF records can include other domains using the include: mechanism. Each inclusion counts toward a limit of 10 DNS lookups. If you exceed this, your SPF record will fail. Keep your record simple to stay under the limit.

Tip: If you're using multiple email services (like both Gmail and a third-party sender), make sure to include all of them in your single SPF record using the include: mechanism.


What Happens Next?
Once your SPF record is set up and verified, email providers will start trusting your domain more. Your emails should see improved deliverability, and you'll have stronger protection against spoofing.

If you also want to set up DKIM and DMARC for complete protection, check out our other guides or use the Warmy DNS test to check your progress.