Frequently Asked Question

SPF Records - How to
Last Updated about a month ago

SPF (Sender Policy Framework)

In today's digital landscape, email security is of utmost importance. One crucial aspect of securing your email infrastructure is implementing Sender Policy Framework (SPF) records correctly. SPF is an email authentication mechanism that helps prevent email spoofing and protects your domain from being used for unauthorized email sending. In this article, we will guide you through the process of setting up SPF records correctly to enhance your email security.

Understanding SPF Records

SPF records are DNS TXT records that specify which mail servers are authorised to send emails on behalf of your domain. When an email is received, the receiving mail server checks the SPF record of the sender's domain to verify if the sending mail server is authorised. If the mail server is not listed in the SPF record, the email may be flagged as spam or rejected altogether.

Step 1: Identify Your Mail Servers

Before creating your SPF record, you need to identify all the mail servers that are authorised to send emails from your domain. This includes your primary mail server, any backup servers, and third-party email services you use.

Step 2: Create Your SPF Record

The SPF record is a single TXT record that consists of a string of text specifying the authorized mail servers. Here's an example of an SPF record:

v=spf1 ip4: ip4: -all

Let's break down the components:

  • "v=spf1" indicates the SPF version, this is always the same.
  • "ip4:" and "ip4:" specify the IP addresses of your authorised mail servers.
  • "" includes GEN's standard SPF record, allowing GEN"s mail servers to send email on your behalf. An SPF Record can have no ipv4 and only an include. 
  • "-all" indicates a hard fail, meaning any mail server not listed in the SPF record will be rejected. This is important because any other value will cause delivery issues. 

Step 3: Publish Your SPF Record

Once you have created your SPF record, you need to publish it in your domain's DNS zone. Add a new TXT record with the host name "@" (or your domain name) and the SPF record as the value. It may take some time for the DNS changes to propagate globally. If you're a GEN Customer simply raise a request at the Helpdesk for this and we'll verify it before adding. 

Step 4: Test Your SPF Record

After publishing your SPF record, it's crucial to test it to ensure it's working correctly. You can use GEN's online SPF testing tool (From the GEN Website, Tools then Email) or send test emails to check if the SPF authentication passes. Make sure to test emails from all your authorised mail servers.

Best Practices

  • Keep your SPF record concise and limit the number of DNS lookups to prevent exceeding the 10 DNS lookup limit.
  • Use the "include" mechanism sparingly and only for trusted third-party services.
  • Regularly review and update your SPF record to reflect any changes in your email infrastructure.


Setting up SPF records correctly is a critical step in securing your email infrastructure and protecting your domain from email spoofing. By identifying your authorised mail servers, creating a comprehensive SPF record, and testing it thoroughly, you can enhance your email security posture.

Domain and Server Reputation are a core component of email delivery, and once your domain or server is blacklisted for a missing or bad SPF record its hard work to recovery.

As always, if you need help, use the HelpDesk. 

This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
Powered by GEN UK

Loading ...