SPF Record Generator

Use SPF Record Generator to create an SPF record.

To learn how to implement SPF/DKIM/DMARC, check out this definitive, step-by-step guide:
How to Implement SPF/DKIM/DMARC to Prevent Email Spoofing/Phishing

Enter IPv4 addresses
Enter IPv6 addresses
Enter hostnames
Enter includes
 Generate SPF Record


Help on SPF record generator

What is an SPF record?

SPF provides mechanisms, qualifiers, and modifiers to allow domain administrators to specify IP addresses in a highly flexible way.

An SPF record is a TXT record published on the domain starting with "v=spf1". It specifies a list of IP addresses where email messages are allowed to sent on behalf of that domain.

The - qualifier stands for FAIL, i.e., the SPF check fails. The all mechanism in an SPF record matches always.

When combined, -all returns SPF failure for all IPs not matched by prior mechanisms.

Sure. Here is an example SPF record:

v=spf1 include:_spf.example.com -all

This record allows any host with an IP address specified in the SPF record of _spf.example.com to send emails on behalf of a domain. Anything else is rejected with a hard fail.

Generally, you should enforce -all in your SPF record. This gives you maximum SPF security.