Skip to main content
wp-config.org

Search tools

Email tools

SPF record generator and checker

Tick every service that sends email as your domain, including your website, and the builder writes one SPF record and counts its DNS lookups. Then test the record you publish to see whether it is valid and what to fix.

  • 10-lookup counter
  • One record for every sender
  • Cloudflare origin check

Free, no sign-up. Results are not saved.

This tool needs JavaScript. Turn JavaScript on and reload the page.

Email DNS

What gets your email delivered in 2026

  • Gmail and Yahoo ask every sender for SPF or DKIM. Bulk senders (for Gmail, about 5,000 or more messages a day to Gmail accounts) also need both SPF and DKIM, a DMARC record (p=none at least) aligned with SPF or DKIM, and one-click unsubscribe for marketing mail. Since November 2025 Gmail has been stepping up enforcement, including rejecting mail that does not comply.
  • Outlook.com, Hotmail and Live ask domains that send more than 5,000 messages a day for passing SPF and DKIM and DMARC p=none or stronger, aligned with one of them. Since 5 May 2025 mail that fails goes to Junk.
  • Mail from your WordPress site (password resets, orders, contact forms) counts too: send it through an SMTP plugin and an email service that is in your SPF and DKIM records.

What you can do

  • Build one SPF record for your mailbox provider and every other sender

  • Count DNS lookups as you build, against the limit of 10

  • Test the published record through every include

  • Find includes that no longer exist and void lookups

  • Catch +all, ?all, ptr and more than one SPF record

  • See whether SPF reveals a server hidden behind Cloudflare

How to create and check an SPF record

  1. List every sender

    Choose where your mailboxes are and tick each service that sends with an address at your domain: your website's SMTP service, newsletters, your help desk. Add IP addresses or extra includes only for servers not in the list.

  2. Publish one TXT record

    Copy the record and add it as a TXT record at your domain's root, replacing any SPF record that is already there. Start with ~all, and keep the lookup count at 10 or below.

  3. Test it

    After a quick Cloudflare security check, the test follows every include, counts the lookups, and lists each problem with a fix. It also asks your domain's own nameservers, so a new record shows before caches expire.

SPF records explained for WordPress site owners

SPF (Sender Policy Framework, RFC 7208) is a TXT record that starts with v=spf1 and lists the servers allowed to send email as your domain. Receivers check it against the bounce address (the return path) of each message.

The rules that matter

  • One record only. Two TXT records starting with v=spf1 make SPF fail with a permanent error, so put every sender in one record.
  • No more than 10 DNS lookups. Each include, a, mx, exists and redirect costs one, and so does everything inside an include. ip4 and ip6 cost nothing. When we last checked, Google Workspace's and Microsoft 365's includes cost one lookup each, while Mailgun's costs 5 and Freshdesk's 7. More than two lookups that find nothing also fail.
  • End with ~all (soft fail) while you confirm your senders. With DMARC enforced, ~all is enough; -all is stricter. Never use +all, which lets anyone send as you, or ?all. Do not use ptr: RFC 7208 says it should not be published.
  • Each string in a TXT record holds at most 255 characters. A longer record is split into several quoted strings, which receivers join without spaces.

Relays and alignment

Most sending services use their own return path, so SPF passes for their domain, not yours, and does not help DMARC. Their mail passes DMARC through DKIM signed with your domain, or through SPF once you set up the service's custom return path (bounce domain) on a subdomain of yours.

Over the limit? Avoid flattening

"SPF flattening" replaces includes with long lists of IP addresses, which break when providers change them. Instead, remove services you no longer use, set up a provider's return-path domain so its include moves off your main record, or send marketing mail from a subdomain with its own SPF record.

WordPress, Cloudflare and your server's address

Do not let the web server send mail itself. Install an SMTP plugin, send through your mailbox provider or an email service, and include that service. An SPF record never hides anything: a and ip4 values are public. With Cloudflare's proxy on, a means Cloudflare's addresses, which never send your mail, and putting your origin server's IP address in SPF reveals the server Cloudflare hides, so attackers can go round it.

Frequently asked questions

Can I have two SPF records?

No. If a domain has more than one TXT record starting with v=spf1, SPF fails with a permanent error for all of your mail. Merge them into one record that lists every sender.

What does too many SPF lookups mean?

Each include, a, mx, exists and redirect in your record costs a DNS lookup, including the ones inside the records you include. Receivers stop after 10 and SPF fails, even for your real email. Remove services you no longer use, replace a and mx with the addresses they stand for, or move a group of senders to a subdomain.

Should I use ~all or -all?

Start with ~all (soft fail) while you check that every sender is listed. With DMARC at quarantine or reject, ~all is safe, because DMARC decides what happens to failing mail. Move to -all only once you are sure the list is complete.

Why does SPF pass but DMARC fail?

DMARC needs SPF to pass for your own domain. Many sending services use their own bounce address, so SPF passes for their domain instead. Set up DKIM with your domain for that service, or its custom return path on a subdomain of yours.

How do I add my WordPress site to SPF?

Do not add the web server. Install an SMTP plugin, send WordPress mail through your mailbox provider or an email service, and add that service's include. Mail from a web server is often marked as spam, and naming the server can reveal its address.

My SPF record is longer than 255 characters. What do I do?

Split it into several quoted strings of up to 255 characters inside the same TXT record. Receivers join them without adding spaces, so split between terms and keep the space at the end of one string or the start of the next. Many DNS hosts split long values for you.

Is the domain I check stored?

The result is not saved. The MTA-STS policy, BIMI logo and certificate the test downloads are read once and not kept. To count how the tool is used, this site keeps the domain you tested for 12 months, with the time, the outcome, your approximate location (country, region and city), the site you came from and your type of device and browser, but no IP address, and never the services or DKIM selectors you picked. The privacy policy has the details.

Related tools

  • Look up DNS records and check SPF, DMARC, DKIM and DNSSEC.

  • Email header decoder

    New (added recently)

    Paste an email’s full headers to see its delivery path, delays, SPF, DKIM, DMARC and ARC results, alignment and spam scores, decoded in your browser.

  • Blacklist checker

    New (added recently)

    Check whether an IP address or a domain’s website and mail servers are on spam blocklists, with what each listing means and how to get removed.

  • DNS propagation checker

    New (added recently)

    Check whether a DNS change has reached Google, Cloudflare, Quad9 and other public resolvers, and when each one refreshes.