Free tool
Build a new SPF record for your domain. Add the IP addresses and email services that send for you, choose a policy, and copy a TXT record ready to publish. Already have a record? Look it up with the SPF checker. Testing a draft you wrote by hand? Paste it into the SPF syntax checker.
CONFIGURE RECORD
Add IPv4 or IPv6 addresses that are authorized to send email from your domain
Include SPF records from email services like Google Workspace, Mailchimp, etc.
Include your domain's A or MX records as authorized senders
Define how to handle emails from unauthorized servers
Messages from unauthorized servers will be marked as suspicious but not rejected
Walkthrough
A 43-second walkthrough: add your server IPs, pick each service that sends for you, tick MX if your own mail servers send too, and choose a policy. Start with ~all while you confirm every sender is listed, then switch to -all. Publish one record at the root of your domain, because two SPF records break it.
Step 1
Under Authorized IP Addresses, enter each server or range that sends mail, such as 192.0.2.10 or 198.51.100.0/24. Leave it empty if you only send through hosted services.
Step 2
Under Third-party Email Services, enter the include domain only, without the include: prefix: _spf.google.com for Google Workspace, spf.protection.outlook.com for Microsoft 365.
Step 3
Tick these only when the servers behind your domain's A or MX records send mail themselves. Each one costs a DNS lookup.
Step 4
Choose ~all, -all or ?all, click Generate SPF Record, then copy the record and publish it as a TXT record.
The generator writes one SPF record in this order: the v=spf1 version tag, then a and mx if ticked, then an ip4: or ip6: mechanism for each address (an address containing a colon is treated as IPv6), then an include: for each service, and finally your policy. For a domain on Google Workspace with one server of its own, the output looks like this:
v=spf1 ip4:192.0.2.10 include:_spf.google.com ~all
It builds the text only. It does not look up DNS, so it can't count how many lookups your includes trigger. Paste the result into the SPF syntax checker to count lookups before you publish, and look up the domain with the SPF checker once the record is live.
| Domain sends from | SPF record |
|---|---|
| Google Workspace | v=spf1 include:_spf.google.com ~all |
| Microsoft 365 | v=spf1 include:spf.protection.outlook.com ~all |
| Google Workspace and Microsoft 365 | v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all |
| Google Workspace plus your own server | v=spf1 ip4:192.0.2.10 include:_spf.google.com ~all |
| Nothing (a parked domain) | v=spf1 -all |
The all mechanism at the end of the record tells receivers what to do with mail from a server you didn't list. The generator offers three policies.
| Policy | Result for unlisted servers | When to use it |
|---|---|---|
| ~all | Soft fail: accept, but treat as suspicious | While you confirm every sender is in the record. The usual starting point. |
| -all | Fail: reject | Once every legitimate sender passes. Also the right choice for a domain that sends no mail. |
| ?all | Neutral: no statement either way | Rarely. It gives no protection against spoofing. |
If mail you send is landing as a soft fail, the SPF softfail fix walks through finding the sender that is missing from the record.
Add the record at the DNS host for your domain, usually your registrar or a DNS provider such as Cloudflare. The fields look like this at most providers:
| Field | Value |
|---|---|
| Type | TXT |
| Host / Name | @ (or blank, depending on the provider) for the root domain |
| Value | The full record from the generator, starting with v=spf1 |
| TTL | The provider default, or 3600 |
FAQ
List every service that sends email as your domain: your mailbox provider, your email platform, your CRM and any server of your own. Start the record with v=spf1, add an include: for each service and an ip4: or ip6: for each server, and end it with ~all or -all. Publish the result as a single TXT record at the root of your domain. This SPF record generator writes the record for you from those inputs.
Google Workspace uses include:_spf.google.com and Microsoft 365 uses include:spf.protection.outlook.com. A domain that sends from both lists both includes in the same record. Other email platforms publish their own include value on their DNS or domain authentication setup page; copy it exactly as they give it.
~all (soft fail) asks receivers to accept mail from unlisted servers but treat it as suspicious. -all (hard fail) asks them to reject it. Start with ~all while you confirm every sender is in the record, then move to -all once nothing legitimate is failing. Avoid ?all (neutral): it tells receivers nothing, so it gives no protection against spoofing.
No. A domain can publish only one TXT record that starts with v=spf1. If there are two, receivers return a permanent error and SPF fails for all of your mail. When you add a new sender, edit the existing record and add its include to it instead of creating a second record.
Receivers stop evaluating an SPF record after 10 DNS lookups and return a permanent error. The include, a, mx, ptr and exists mechanisms and the redirect modifier each cost a lookup, and so does every include inside an included record. ip4, ip6 and all cost nothing. If you are close to the limit, replace a and mx with the server IPs, and remove includes for services you no longer use.
At the DNS host for your domain, which is usually your registrar or a DNS provider such as Cloudflare. Create a TXT record, set the host or name to @ (or leave it blank, depending on the provider), paste the SPF record as the value, and save. If a subdomain sends its own mail, it needs its own SPF record on that subdomain.
Only if the servers behind your domain's A record or MX records actually send email. If your mail goes out through Google Workspace or Microsoft 365, their include already covers it, so a and mx only add DNS lookups. Leave both unticked unless you run your own mail or web server that sends.
Usually minutes, sometimes up to 48 hours, depending on your DNS provider and the TTL of any record you replaced. Once it has propagated, look up the domain with an SPF checker to confirm receivers see the record you published.
No. SPF is one of three authentication records. The other two are DKIM, which signs each message, and DMARC, which tells receivers what to do when SPF and DKIM fail. Gmail and Yahoo require all three from bulk senders, so set them up on every domain you send from. Content and sender reputation also decide inbox placement.
Inboxkit automatically generates and manages SPF records for all your domains