SPF Record Generator
Build the TXT record
Live previewTick the services that send mail for you, add any other include or IP, and copy one record. Publish it on the MAIL FROM domain. A second v=spf1 record on the same name is a permanent error.
Use the envelope domain, which can be a subdomain such as mail.example.com. In a DNS panel that appends the zone, the root host is often @.
1 of 10 lookup mechanisms on this recordinclude, a, mx, ptr, exists and redirect count. ip4, ip6 and all do not. Nested records inside each include can add more. Over 10 on the path a receiver walks is a permerror.
DNS type: TXT
v=spf1 include:_spf.google.com ~all
- Note
1 lookup mechanism is on this record. Each include can add more lookups inside that provider. The limit is 10.
- Note
~all is a soft fail for everyone else. Use it while you are still finding every legitimate sender.
Check a record that is already published with the SPF checker. Pair it with the DKIM checker and the DMARC record generator.
SPF flattener
Resolves includesPaste a domain that already publishes SPF. This follows include, a and mx and rewrites them as the IP addresses published right now. IP mechanisms do not count toward the 10 DNS lookup limit. The result goes stale when a provider changes those addresses, so treat it as something you refresh, not a record you can forget.
Free SPF record generator and SPF flattener. Pick providers, add includes or IPs, preview the TXT record and lookup count, and flatten includes.
Check a live record with the SPF checker. Build the policy with the DMARC record generator.
A policy for mail that fails authentication.
A DMARC lookup reads the TXT record at _dmarc.yourdomain. DMARC ties the visible From domain to SPF or DKIM. A message can pass when either one passes and aligns with that From domain. An SPF pass by itself does not establish alignment. The lookup on this page comes first. The tag breakdown under the record explains what is published.
What each tag is asking for
p is the policy: none, quarantine or reject. sp is the policy for existing subdomains, and it falls back to p when it is absent. rua is where aggregate reports should go. ruf asks for per-message failure reports, which many receivers send rarely. adkim and aspf choose relaxed or strict alignment. The default is relaxed. fo says when to send a failure report, and receivers ignore it unless ruf is set.
pct is historic. RFC 9989 removed it because receivers applied a percentage unevenly. A value below 100 is not a reliable way to roll a policy out. The current testing signal is t=y, which asks receivers to apply a policy one step weaker than the one you published. It does nothing while the policy is none.
The path from none to reject
p=none is monitoring only. It asks receivers not to quarantine or reject mail because of DMARC, and to send reports if you set rua. DNS does not say how long that record has been published. Leave it there while you read reports and fix senders that fail. Then move to p=quarantine, and to p=reject only after your own mail passes and aligns. Publishing p=reject first can drop real mail. The generator on this page builds the monitoring record. It does not publish DNS for you.
Warnings this lookup can raise
No rua address means you will not get aggregate reports. More than one DMARC record at the same name is an error. A record on the domain itself, or at dmarc without the underscore, is on the wrong host. Receivers read _dmarc. Bad syntax, a p value other than the three policies, and pct below 100 are called out in the result. A report address on another domain needs an authorization record. This page does not check that record: DMARC rua shows what it looks like. If nothing was found at all, read DMARC record not found.
If the name you entered has no policy, the checker looks at the organizational domain using the public suffix list. That is the method from the older spec. RFC 9989 uses a DNS tree walk, so a receiver on the new spec can choose a different name. Publish the record on the domain you actually send from.
Know what was checked
This tool checks the published record. It does not authenticate a message or confirm inbox placement. Check the other two records with the SPF checker and the DKIM checker. What is DMARC is the longer explanation, and SPF, DKIM and DMARC explained is the short map of the three. The current specification is RFC 9989.
What the result does and does not mean.
What is an SPF record generator?
An SPF record generator builds one v=spf1 TXT value from the senders you select. This one adds include mechanisms for common providers, plus any include or IP you type, and ends with ~all or -all. Publish that single record on the MAIL FROM domain. A second v=spf1 record on the same name is a permanent error.
What is an SPF flattener?
An SPF flattener looks up include, a and mx mechanisms and rewrites the record as ip4 and ip6 mechanisms. IP mechanisms do not count toward the 10 DNS lookup limit. The addresses are whatever DNS published at the moment you flattened. Providers change them. A flattened record has to be refreshed or mail that used to pass starts failing.
How many DNS lookups can an SPF record use?
Receivers may use at most 10 DNS lookups on the path for one message. include, a, mx, ptr, exists and redirect count. ip4, ip6 and all do not. The generator counts the mechanisms on the record you are building. Each include can add more lookups inside the provider's own record. The checker shows the expanded count for a domain that is already published.
Which SPF include should I use for Google Workspace or Microsoft 365?
Google Workspace uses include:_spf.google.com. Microsoft 365 uses include:spf.protection.outlook.com. SendGrid uses include:sendgrid.net. Mailgun uses include:mailgun.org. Amazon SES, and SendPanda's return-path record, use include:amazonses.com. SendPanda publishes that record on the MAIL FROM subdomain shown in the dashboard, often mail.yourdomain, rather than replacing a mailbox SPF record by itself.
When should I flatten an SPF record?
Flatten when the expanded lookup count is over 10, or so close that the next sender would cross it. While the count is comfortably under 10, keep the includes. Includes follow provider IP changes. A flattened record does not. Re-run the flattener when a provider tells you their SPF changed, and after you add or remove a sender.
From DNS records to your first send.
Send transactional emails, build templates and receive replies on your own domain. 3,000 emails a month free.