Call Anytime

0800 208 8456

FREE SECURITY TOOL

SPF Record Generator

An SPF record tells email providers which servers are authorised to send email on behalf of your domain. Without one, attackers can send emails that appear to come from your business. This tool generates the record for you, correctly formatted and ready to add to your DNS.

What is SPF and Why Does Your Business Need It?

SPF (Sender Policy Framework) is an email authentication protocol that prevents attackers from sending emails using your domain name. It works by publishing a DNS record that lists every server and service authorised to send email on your behalf.

When an email arrives, the receiving server checks the SPF record for the sender’s domain. If the sending server is not on the list, the message is flagged as suspicious or rejected entirely.

Without an SPF record, anyone can forge emails from your domain. That means phishing emails to your customers, fake invoices to your suppliers, and fraudulent password reset requests to your staff, all appearing to come from your business.
SPF is one of the three pillars of email authentication, alongside DKIM and DMARC. It is a requirement under the Cyber Essentials certification scheme and recommended by the National Cyber Security Centre (NCSC).

How This Tool Works

Steps

Enter your domain

Type your domain name (for example, yourbusiness.co.uk). The tool uses this to generate the DNS record name.

Select your email services

Tick every service that sends email using your domain. This includes your main email provider (Microsoft 365, Google Workspace), marketing platforms (Mailchimp, SendGrid), CRM tools (HubSpot, Salesforce), and any other service that sends on your behalf.

Add custom entries

If you use services not on the list, or have dedicated mail servers with static IP addresses, add them in the custom entries section. The tool automatically formats them as include: or ip4:/ip6: entries.

Choose your failure policy

Select how strictly receiving servers should handle emails from unlisted senders. Start with Soft Fail while testing, then move to Hard Fail once you are confident.

Copy your record

Copy the generated TXT record value and add it to your domain's DNS settings alongside your domain name as the hostname.

Understanding the Options

The tool includes pre-configured SPF entries for 16 of the most common email services. When you tick a service, its known SPF include domain is added to your record automatically.

If you use a service that is not listed, add its SPF include domain in the custom entries section. Your provider’s documentation will tell you what to add, usually in a “Set up SPF” or “Email authentication” guide.

This section lets you add entries that are not covered by the pre-built service list.

Include domains:

If your provider gives you an SPF include domain (for example, include:mail.example.com), enter it here. The tool will format it correctly.

IPv4 addresses:

If you have a dedicated mail server with a static IP address, enter it here (for example, 203.0.113.10 or 203.0.113.0/24 for a range). The tool will prefix it with ip4:.

IPv6 addresses:

For IPv6 addresses, enter the full address. The tool will prefix it with ip6:.

The failure policy tells receiving servers what to do when an email comes from a server not listed in your SPF record.

Soft Fail (~all):

The recommended default. Messages from unlisted servers are accepted but marked as suspicious. This is the safest option while you are setting up and testing your SPF record, because it will not block legitimate emails if you have missed a service.

Hard Fail (-all):

Messages from unlisted servers are rejected outright. Only use this once you are completely confident that every legitimate email service is included in your record. If you switch to Hard Fail too early, you may block your own emails.

Neutral (?all):

No opinion expressed. The SPF record is present but does not influence delivery decisions. This is rarely useful and is not recommended.

SPF records have a hard limit of 10 DNS lookups. Every include: mechanism counts as one lookup because the receiving server must resolve it. IP addresses (ip4: and ip6:) do not count against this limit.
The counter shows how many lookups your current configuration uses. If you exceed 10, your SPF record will fail validation and email delivery will be affected.

Tips for staying under the limit: – Remove services you no longer use – Use IP addresses instead of includes where possible – Consider SPF flattening services if you genuinely need more than 10 includes

SPF Record Generator

Your Domain

Enter your domain without "www" or "https."

Email Services

Select every service that sends email using your domain.

Custom Includes or IP Addresses

Add any custom include domains or IP addresses not listed above.

Failure Policy

Soft Fail is recommended for most businesses. Move to Hard Fail once all legitimate senders are included.

DNS Lookups Used0 / 10

SPF allows a maximum of 10 DNS lookups. Each "include:" counts as one lookup.

Generated SPF Record
DNS Record Name (Hostname)
TXT Record Value
Copied to clipboard

SPF Works Best with DMARC

SPF tells email providers which servers can send email from your domain. DMARC tells them what to do when a message fails that check.

Without DMARC, most email providers will accept emails that fail SPF checks and deliver them anyway. DMARC adds the enforcement layer that makes SPF effective.

For the strongest email security, you need all three protocols configured correctly:

SPF

Authenticates the sending server.

DKIM

Authenticates the message content with a digital signature.

DMARC

Ties them together and sets the enforcement policy.

Use our free DMARC Record Generator to create your DMARC record, and our Email Security Checker to verify that everything is configured correctly.

Common SPF Mistakes to Avoid

Forgetting third-party senders

If any service sends email using your domain (marketing platforms, invoicing tools, helpdesk software, etc.), it must be in your SPF record. Missing one means those emails may be flagged as spam or rejected.

Exceeding the 10 lookup limit

Every include: counts as a DNS lookup. If you exceed 10, your entire SPF record fails. The tool warns you when you are approaching the limit.

Using Hard Fail too early

Switching to -all before confirming all legitimate senders are included will block your own emails. Always start with Soft Fail (~all) and test thoroughly.

Having multiple SPF records

A domain can only have one SPF record. If you have two, both will be invalid. Make sure to combine all services into a single record.

Not updating the record

When you add or remove email services, your SPF record needs to be updated. An outdated record is a common cause of legitimate email being rejected.

Need Help Setting Up Email Security?

SPF is just one part of a complete email security setup. SPF, DKIM, and DMARC need to work together, and they need to be configured correctly for every service that sends email on your behalf. If you are not sure where to start, we can help.

Call us: 0800 208 8456  |  Email: hello@cyberkaizen.co.uk