Home › Tools › Email Marketing Tools › SPF Record Generator and Checker
Free Email Tool

SPF Record Generator and Checker

Tick the services that send email for your domain to get one ready to paste SPF record, with a live count of DNS lookups. Already have records? Paste them into the checker to catch errors, the 10 lookup limit and duplicate records, then merge them into one in a click.

Build Your SPF Record

Services that send email for you

Your DNS Record

0DNS lookups of 10
0Characters
0Senders
TypeTXT
Host or Name
Full name
TTL3600 or your panel default

Value

Check or Merge Existing SPF Records

Copied!

What Is an SPF Record?

SPF, short for Sender Policy Framework, is a TXT record in your domain's DNS that lists the servers allowed to send email for your domain. When Gmail, Yahoo or Outlook receives a message, it checks the sending server against this list. If the server is not on it, the mail can be marked as spam or rejected.

SPF is now a basic requirement. The Google email sender guidelines ask every sender to set up SPF or DKIM, and bulk senders need SPF, DKIM and DMARC together. The hard part is that most businesses send from several places, such as Google Workspace for staff, Brevo for newsletters and a website server for order emails, and all of them must sit in one record. This generator builds that one record, and the checker finds the mistakes that silently break SPF.

How to Create and Add Your SPF Record

  1. List every service that sends email with your domain in the From address: your mailbox provider, newsletter tool, CRM, shop and website.
  2. Tick those services or paste the include value each one gives you in its domain setup page. Add fixed server IP addresses if you have them.
  3. Start with ~all, then copy the record and the host. For the main domain the host is @.
  4. Replace any existing SPF record in your DNS panel. Never add a second one next to it.
  5. Paste the live record into the checker after a few hours to confirm it is valid and under the lookup limit.

SPF Mechanisms Explained

TermExampleLookupsWhat it does
ip4 and ip6ip4:203.0.113.250Allows one address or a range. A single IPv4 address means /32
includeinclude:_spf.google.com1 plus nestedAllows every server in another domain's SPF record
a and mxmx1Allows the servers your domain's A or MX records point to
exists and redirectredirect=_spf.example.com1Advanced checks, and handing the whole policy to another domain
ptrptr1Reverse DNS match. RFC 7208 says not to use it
~all, -all~all0Ending for every other server: soft fail or fail

The rules come from RFC 7208, the SPF standard. Microsoft explains the lookup count well in its SPF setup guide.

Practical Tips

Finish Your Email Setup

SPF works best with DKIM and DMARC. Plan your sending with our email marketing strategy guide, and if your website sends mail from code, read how to send email in PHP and contact form spam protection in PHP. Then publish a policy for failing mail with the DMARC record generator and checker.

Frequently Asked Questions

1Can a domain have two SPF records?

No. A domain may have only one TXT record that starts with v=spf1. With two or more, receivers return a permanent error and SPF fails for all your mail. Combine every include and IP address into a single record instead.

2What is the SPF 10 DNS lookup limit?

RFC 7208 allows at most 10 DNS lookups while checking SPF. Every include, a, mx, ptr and exists term and the redirect modifier costs one, and includes inside included records count too. IP addresses and all cost nothing. Going over 10 makes SPF fail.

3Should I use ~all or -all?

~all (soft fail) asks receivers to treat unlisted senders as suspicious, and Google recommends it. -all (fail) asks them to reject such mail, and Microsoft recommends it. Start with ~all, and move to -all once you are sure every sender is listed.

4Where do I add the SPF record?

Add it as a TXT record in the DNS settings where your domain is managed, such as your registrar, hosting panel or Cloudflare. Use @ as the host for the main domain. If an SPF record is already there, edit it instead of adding a new one.

Related Articles

More Free Email Marketing Tools

See all email marketing tools →  |  Browse every free tool →