SPF record generator
- Free
- No sign-up
- Runs in your browser
Who sends email for your domain?
Tick every service that sends as you@yourdomain. One record covers them all.
Your record so far
v=spf1 include:_spf.google.com ~all
What should happen to email from servers you did not tick?
Your SPF record
v=spf1 include:_spf.google.com ~all
Hover over or select any part to see what it does.
- Uses at least 1 of the 10 lookups SPF allows. Services can add a few of their own.
- Ends with ~all, the recommended setting
- 35 characters, fits in one TXT string
Add it to your DNS
At your domain provider, add one TXT record:
- Type
- TXT
- Host
- @
- Value
- v=spf1 include:_spf.google.com ~all
A domain may have only one SPF record. If you already have one, replace it with this one instead of adding a second.
What each part of the record means
An SPF record is one line of text in your DNS. Receivers read it left to right.
v=spf1
Marks the text as an SPF record. It always comes first, and a domain may have only one record that starts with it.
include
Hands the check to another domain's SPF record, usually your email provider's. Each one costs at least one of the ten DNS lookups.
ip4, ip6, a, mx
Name servers directly: by address, or by your domain's own address and mail servers. ip4 and ip6 cost no lookups; a and mx cost one each.
all
The ending: what to do with mail from everyone not listed. ~all marks it, -all rejects it, ?all says nothing.
How to publish it
List every sender first. Your mailbox provider, newsletter tool, help desk, billing system and website can all send as your domain. A sender left out will fail SPF.
Replace, do not add. Look in your DNS for a TXT record on the same host that starts with v=spf1. If there is one, edit it into the record built here. If there is none, add a new TXT record.
Wait, then check. Google says SPF can take up to 48 hours to start working. Then run the domain setup checker to see the live record and its lookup count.
Then add DKIM and DMARC. SPF alone only covers the hidden sender address. Google asks bulk senders for SPF, DKIM and DMARC; the DMARC record generator builds the last one.
Common mistakes
Two SPF records. A second record does not add senders. It breaks SPF for the whole domain (RFC 7208, section 3.2).
Too many includes. Past 10 lookups, SPF fails. Drop services you no longer use, or send some mail from a subdomain with its own record, as Microsoft suggests.
Typing errors. A space after include:, an equals sign in place of the colon, or a dot at the end of the domain all make the term invalid. Microsoft lists these three in its SPF guide.
Ending with +all. It allows every server on the internet to send as you, so the record protects nothing.
Adding a service that does not need it. Some services send with their own bounce domain and pass SPF there. Postmark, for example, says an include is not needed. Follow each provider's own setup page.
Where the rules come from
- RFC 7208, the SPF standard: one record per domain (section 3.2), strings over 255 characters (section 3.3), the 10 lookup limit (section 4.6.4)
- Google: email sender guidelines
- Google Workspace: include:_spf.google.com
- Microsoft 365: include:spf.protection.outlook.com
- Zoho Mail: include:zohomail.com
- SendGrid: include:sendgrid.net
- Mailgun: include:mailgun.org
- Amazon SES: include:amazonses.com
- Zendesk: include:mail.zendesk.com
- Freshdesk: include:email.freshdesk.com
- Postmark: why no include is needed for Postmark
Questions
Short answers to the common ones.
Can a domain have two SPF records?
Should I end my SPF record with ~all or -all?
What is the 10 DNS lookup limit?
My SPF record is longer than 255 characters. Is that a problem?
Do I need SPF if I already have DKIM?
outr checks SPF on every inbox you connect.
It tells you what to fix before anything is sent, then sends your cold email from your own inboxes, follows up, and drafts every reply.