Samprix

SPF Record Checker

Check a domain’s SPF record. Every include is followed and every DNS lookup counted, and each problem comes with the fix.

  • Live DNS lookup
  • Results in seconds
  • No sign-up
  • Free
DNS lookups 10/ 10
Policy for others ~all Soft fail
SPF records 1 Exactly one is allowed

Results for github.com

  • Warning:10 of 10 DNS lookups used

    Close to the limit. Adding one or two more services will make SPF fail; a provider changing its own include can push it over without you changing anything.

  • OK:Ends with ~all (soft fail)

    Servers not listed get a soft fail. With DMARC in place this is the usual choice; -all is stricter.

  • OK:One SPF record published

Edit this record in the SPF generator
SPF record github.com

v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com include:_netblocks.google.com include:_netblocks2.google.com include:mail.zendesk.com include:_spf.salesforce.com include:servers.mcsv.net include:mktomail.com include:sendgrid.net ip4:62.253.227.114 ip4:166.78.69.169 ip4:166.78.69.170 ip4:166.78.71.131 ~all

Include tree

  • github.com 8 lookups

    • ip4:192.30.252.0/22
    • include:spf.protection.outlook.com
    • include:_netblocks.google.com
    • include:_netblocks2.google.com
    • include:mail.zendesk.com
    • include:_spf.salesforce.com
    • include:servers.mcsv.net
    • include:mktomail.com
    • include:sendgrid.net
    • ip4:62.253.227.114
    • ip4:166.78.69.169
    • ip4:166.78.69.170
    • ip4:166.78.71.131
    • ~all
    • spf.protection.outlook.com include 0 lookups

      • ip4:40.92.0.0/15
      • ip4:40.107.0.0/16
      • ip4:52.100.0.0/15
      • ip4:52.102.0.0/16
      • ip4:52.103.0.0/17
      • ip4:104.47.0.0/17
      • ip6:2a01:111:f400::/48
      • ip6:2a01:111:f403::/49
      • ip6:2a01:111:f403:8000::/51
      • ip6:2a01:111:f403:c000::/51
      • ip6:2a01:111:f403:f000::/52
      • -all
    • _netblocks.google.com include 0 lookups

      • ip4:74.125.0.0/16
      • ip4:209.85.128.0/17
      • ~all
    • _netblocks2.google.com include 0 lookups

      • ip6:2001:4860:4000::/36
      • ip6:2404:6800:4000::/36
      • ip6:2607:f8b0:4000::/36
      • ip6:2800:3f0:4000::/36
      • ip6:2a00:1450:4000::/36
      • ip6:2c0f:fb50:4000::/36
      • ~all
    • mail.zendesk.com include 0 lookups

      • ip4:103.151.192.0/23
      • ip4:185.12.80.0/22
      • ip4:188.172.128.0/20
      • ip4:192.161.144.0/20
      • ip4:216.198.0.0/18
      • ~all
    • _spf.salesforce.com include 1 lookup

      • exists:%{i}._spf.mta.salesforce.com
      • -all
    • servers.mcsv.net include 0 lookups

      • ip4:205.201.128.0/20
      • ip4:198.2.128.0/18
      • ip4:148.105.0.0/16
      • -all
    • mktomail.com include 0 lookups

      • ip4:199.15.212.0/22
      • ip4:72.3.185.0/24
      • ip4:72.32.154.0/24
      • ip4:72.32.217.0/24
      • ip4:72.32.243.0/24
      • ip4:94.236.119.0/26
      • ip4:37.188.97.188/32
      • ip4:185.28.196.0/22
      • ip4:192.28.128.0/18
      • ip4:103.237.104.0/22
      • ip4:130.248.172.0/24
      • ip4:130.248.173.0/24
      • ~all
    • sendgrid.net include 1 lookup

      • ip4:167.89.0.0/17
      • ip4:208.117.48.0/20
      • ip4:50.31.32.0/19
      • ip4:198.37.144.0/20
      • ip4:198.21.0.0/21
      • ip4:192.254.112.0/20
      • ip4:168.245.0.0/17
      • ip4:149.72.0.0/16
      • ip4:159.183.0.0/16
      • ip4:134.128.64.0/18
      • ip4:159.26.176.0/20
      • include:ab.sendgrid.net
      • ~all
      • ab.sendgrid.net include 0 lookups

        • ip4:223.165.113.0/24
        • ip4:223.165.115.0/24
        • ip4:223.165.118.0/23
        • ip4:223.165.120.0/23
        • ip4:137.22.245.0/24
        • ip4:137.22.246.0/24
        • ~all

Advertisement

How SPF works

When a server receives an email, it looks at the domain in the message’s return path (the “envelope from”, which is usually your domain or your email service’s) and fetches that domain’s SPF record. If the sending server’s IP address is on the list, SPF passes. If not, the “all” at the end of the record says what to report: fail, soft fail or neutral.

SPF alone doesn’t decide what happens to a message. DMARC does that, using the SPF and DKIM results. That’s why SPF needs to be right and line up with the domain people see in the From address. See SPF, DKIM and DMARC explained.

The parts of a record

TermMeansLookups
include:domainAlso allow the servers in that domain’s SPF record1, plus its own
ip4: / ip6:Allow an address or range0
a / mxAllow the domain’s own web or mail server addresses1 each
exists, ptrRarely used; ptr is deprecated1 each
redirect=domainUse another domain’s record instead1
~all / -allEverything else soft fails / fails0

Includes for common email services

Add one include for every service that sends email with your domain in the return path. A typical record for Google Workspace plus a newsletter service looks like v=spf1 include:_spf.google.com include:sendgrid.net ~all. Check your provider’s own setup page too; some services send through their own domain and need no include at all.

ServiceInclude
Google Workspaceinclude:_spf.google.com
Microsoft 365include:spf.protection.outlook.com
Zoho Mailinclude:zohomail.com
Proton Mailinclude:_spf.protonmail.ch
Fastmailinclude:spf.messagingengine.com
SendGridinclude:sendgrid.net
Mailguninclude:mailgun.org
Brevoinclude:spf.brevo.com
Zendeskinclude:mail.zendesk.com

Fixing the common problems

  • Over 10 lookups: remove services you no longer use, replace a and mx with the ip4 ranges they stand for, or move bulk mail to a subdomain with its own record. Full walk-through: fixing too many DNS lookups.
  • Two SPF records: merge them into one: a single v=spf1, every include from both, and one ~all at the end.
  • Malformed record: DNS panels sometimes store quote marks or spaces as part of the value. The record must start exactly with v=spf1.

Did this tool do what you needed?

All tools