SPF Record Generator

Create a valid SPF record in a matter of seconds.

1

Domain

2

ESP

3

Email

4

SPF value

Let's get started!

Please provide the domain for which you'd like to generate a SPF record

Our SPF record generator is a free online tool that can help you easily create your SPF records from scratch and improve your email deliverability and security in just a few clicks.

  1. Enter the domain for which the SPF record should be created.
  2. Choose your ESP or email outreach tool.
  3. Specify the email address for your new SPF record.
  4. Hit the "Next" button and you're all set!

What is an SPF record?

SPF (Sender Policy Framework) record is a DNS authentication record that specifies mail servers and authorized IP addresses from which email messages are allowed to be sent on behalf of the given domain.

The purpose of the SPF records is to improve senders' email deliverability and protect the receiving servers against spam methods such as email spoofing.

Here is a simple example of how an SPF record can look:

v=spf1 include:_spf.google.com include:sendgrid.net -all

An SPF record can be added to your domain's DNS settings in the form of a TXT record by your domain provider.

Why is an SPF record important?

An SPF record protects both senders and recipients from various malicious email practices such as spamming, spoofing, phishing, etc.

Adding an SPF record to your DNS also provides several additional benefits, such as:

  • Boosted email deliverability: ISPs and ESPs pay attention to the authenticity of incoming emails by checking the SPF records of the sender. With properly set up SPF records, you can improve your overall email deliverability and therefore decrease the probability that your emails will be marked as spam.
  • Secured domain reputation: SPF records can protect your email reputation by preventing spammers and scammers from using malicious emails on your behalf.
  • Improved email security: SPF record can be utilized along with other email authentication protocols such as DMARC (Domain-based Message Authentication, Reporting & Conformance) and DKIM (DomainKeys Identified Mail) which combined significantly improve the overall email protection.
  • Compliance with industry standards: SPF records can be considered a necessary component of email security. Having properly configured SPF is often requested by receiving email servers to identify and accept your messages.

How does an SPF record work?

An SPF record contains all email servers that are authorized to send emails via your domain name.

Whenever the recipient's email server receives a message from a particular domain, it checks its SPF record to verify that the message was sent from an authorized server. This verification helps protect the recipient from phishing and spoofing email practices.

The SPF record can be composed of multiple tags and values that define which email servers are allowed to send messages for the given domain.

SPF tags and values explained

Tags Descriptions
v The main version tag must contain the "spf1" value; otherwise, the SPF record won't be recognized as valid by the recipient's mail server.
include An important tag that provides information about sending sources (e.g., third-party email services) and confirms that all of them are verified as legitimate.
all A necessary tag that tells the recipient how emails should be treated if they are sent from non-authorized servers. The "all" tag can contain "~", "+", "-", or "?" qualifiers.
IP4 Specifies which IPv4 addresses can send emails on behalf of your domain.
IP6 Specifies which IPv6 addresses can send emails on behalf of your domain.
a The A record tag allows SPF to validate the IP address of the sender's domain.
mx Verifies the MX record of the mail server.
exists Checks whether or not the A record tag actually exists.
Redirect A redirect tag that can delegate the SPF authentication to another domain.

How to create and publish an SPF record?

In order to create and publish the SPF record for your domain, you have to specify exactly which sources are allowed to send emails on your behalf.

Depending on whether you know the syntax rules, you can create your own SPF record either manually or using our free SPF record generator - which will help you create a proper SPF record without any mistakes in just a few clicks.

With the SPF record properly generated, you can add it in the TXT format in a few simple steps:

  1. Log in to your domain's DNS registrar.
  2. Find the section on your platform for managing DNS records.
  3. Depending on your platform, click on the option to add a new record and choose the "TXT" type.
  4. Copy and paste your freshly generated SPF record into your settings and hit the "Add New" or "Update" button.

Once you've updated your SPF record, check whether the record was properly saved in your DNS records.

In some cases, it might take some time for your SPF record to take effect for your domain, depending on the DNS provider.

SPF record best practices

Although generating and publishing an SPF record is not rocket science, there are a few things that you should always keep in mind when creating a new SPF record.

  • Pay attention to formatting: Make sure that you create, copy, and paste the SPF record without unintended characters or extra spaces.
  • Avoid multiple SPF records: You should always have only one SPF record for your domain.
  • Check and test your SPF record: Always double-check to ensure your SPF record is functioning properly and as intended.
  • Write down historical changes: It is recommended to document the history of changes to your SPF record. This helps in understanding what modifications were made in the past.

Frequently asked questions

What is the difference between SPF and DMARC?

SPF checks if an email is sent from an approved server for a domain to prevent spoofing. DMARC uses SPF and DKIM checks to enforce rules on how to handle unauthenticated emails and provides reports to the domain owner about suspicious activity.

What is the format of a SPF record?

An SPF record is a line of plain text that begins with v=spf1 and includes various tags (or mechanisms) such as "ip4", "ip6", "include", and "all" to specify which mail servers are authorized to send emails for a domain.

Do I need to be an expert when creating a new SPF record?

No, you don't need to be an expert to create an SPF record, but some basic understanding of DNS settings and email servers is helpful.

Most domain registrars and hosting providers offer guides and tools to simplify the process, and tools such as our free SPF generator can help you create a proper SPF record quickly.

Can I have multiple SPF records for a single domain?

No, you should not have multiple SPF records for a single domain as it can cause validation issues. Instead, you can combine all the necessary information into a single SPF record.

Can SPF records be bypassed by spammers?

While SPF helps reduce the probability of malicious email attacks, it is not foolproof and can still be spoofed. Spammers can exploit misconfigurations in SPF records or send emails from domains that do not have SPF protection. Therefore, combining SPF with other protocols like DKIM and DMARC provides a more robust defense against spoofing.