You don't have javascript enabled. Please enable javascript to use this website.

SPF Record Generator

Build an SPF record and copy it into your DNS.
The domain in your From address, or the subdomain a service asks you to set up. "Start from my current record" reads what it publishes now.

1. Who sends email for your domain?

2. Your own servers

3. Mail from any other server

Advanced: more hosts, redirect

Your SPF record

TypeTXT
Name@the domain itself; for a subdomain such as mg.example.com, mg
Full nameyourdomain.com
Valuev=spf1 ~all
Zone fileyourdomain.com. 3600 IN TXT "v=spf1 ~all"

11 characters · No DNS lookups.

      Live check, before you publish

      Tick a service to count its DNS lookups.

      Check it once published → Next: a DMARC record →

      An SPF record generator builds the one TXT record that lists the servers allowed to send email for your domain. Publish it at the domain itself (@), replacing any older v=spf1 record.

      How to Publish Your SPF Record

      Add or edit one TXT record at the domain with the value above, then check it.

      1. Open the DNS settings at your DNS host (where your domain's name servers point: the NS lookup tells you).
      2. Look for a TXT record starting with v=spf1. If there is one, replace its value; if not, add a TXT record with the name @.
      3. Never leave two v=spf1 records: SPF then fails for every message.
      4. Wait for the TTL (often an hour), then run the SPF record checker.
      5. Add DKIM in each service and a DMARC record: SPF alone doesn't protect the From address people see.
      DNS hostName fieldValue field
      Cloudflare@The value as shown, without quotes
      GoDaddy@The value as shown, without quotes
      Namecheap@The value as shown, without quotes
      Amazon Route 53empty (the domain)In double quotes ("v=spf1 …"); over 255 characters, split it like the zone file line
      Your own DNS server (BIND, PowerDNS…)The zone file line above

      For a subdomain such as mg.example.com, the name is mg in the example.com zone. A subdomain doesn't inherit the domain's SPF record.

      SPF Values for Common Mail Services

      Each service gives one include. Several popular senders need none, because receivers check their own return-path domain instead of yours.

      ServiceAdd to your recordNote
      Google Workspaceinclude:_spf.google.com
      Microsoft 365include:spf.protection.outlook.comGCC High / DoD: include:spf.protection.office365.us; 21Vianet: include:spf.protection.partner.outlook.cn
      Zoho Mailinclude:zohomail.comEurope: include:zohomail.eu; India: include:zohomail.in; other data centers: the value in Zoho Mail Admin Console
      Proton Mailinclude:_spf.protonmail.ch
      Fastmailinclude:spf.messagingengine.com
      iCloud+ custom domaininclude:icloud.com
      GoDaddy emailinclude:secureserver.net
      IONOSinclude:_spf-eu.ionos.comUS contracts: include:_spf-us.ionos.com
      Hostinger Emailinclude:_spf.mail.hostinger.com
      Titan Emailinclude:spf.titan.email
      Namecheap Private Emailinclude:spf.privateemail.com
      Rackspace Emailinclude:emailsrvr.com
      OVHcloud emailinclude:mx.ovh.com
      Mimecastinclude:eu._netblocks.mimecast.comYour region: de., us., ca., za. or au._netblocks.mimecast.com; the global _netblocks.mimecast.com costs 6 lookups
      Mailguninclude:mailgun.orgOn the domain you verified in Mailgun (often mg.yourdomain)
      Mailjetinclude:spf.mailjet.com
      Elastic Emailinclude:_spf.elasticemail.com
      SMTP2GOinclude:spf.smtp2go.comCompare with Verified Senders in SMTP2GO
      Campaign Monitorinclude:_spf.createsend.comDMARC passes through DKIM: set it up too
      MailerLiteinclude:_spf.mlsend.comFor aligned SPF, the subdomain records MailerLite gives you
      HubSpotYour account's valueLike 123456.spf03.hubspotemail.net: Settings, Content, Domains & URLs, Email Sending
      Salesforceinclude:_spf.salesforce.com
      Zendeskinclude:mail.zendesk.com
      Freshdeskinclude:email.freshdesk.comOnly with Freshdesk's own mail server; costs several lookups
      Atlassian (Jira, Confluence)include:_spf.atlassian.net
      Mailchimp · Postmark · Help ScoutNothingThey send with their own return path. Mailchimp: authenticate the domain (DKIM); Postmark: its custom Return-Path CNAME; Help Scout: not needed since 2024
      SendGrid · Amazon SES · Brevo · Shopify · Constant ContactUsually nothingSendGrid with Automated Security, SES with its default MAIL FROM, Brevo and Constant Contact on shared IPs, Shopify with its CNAME records: add an include only if the service shows one for your account

      Values from each provider's own setup documentation, checked 12 November 2026. Providers change them rarely, but they do: the live check above shows an include that no longer exists as an error.

      Staying Under 10 DNS Lookups

      Every include, a and mx costs a lookup, and so does every include inside it. Over 10, SPF fails for all your mail.

      • Remove what you no longer use. Old newsletter tools and former mail hosts are the usual cause.
      • Leave out services that need no entry (Mailchimp, Postmark, SendGrid with Automated Security): they don't use your record.
      • Drop a and mx unless those servers really send mail; list their public IPs with ip4: instead (no lookup).
      • Give a service its own subdomain (news.example.com) with its own SPF record, so its lookups don't count against the main domain.
      • Be careful with flattening (replacing includes with IP lists): it breaks silently when a provider changes its addresses, unless a service keeps it updated for you.

      Built in your browser. To count lookups and test an IP, the record you build (not your other entries) is sent to our server, which resolves its includes through Google Public DNS, like the SPF checker. "Start from my current record" reads the domain's public DNS. Nothing is stored. Last verified 12 November 2026.

      Frequently Asked Questions

      How do I create an SPF record?
      Tick the services that send email for your domain above, add your own servers if any, and choose ~all or -all. Copy the value and add it at your DNS host as one TXT record with the name @ (the domain itself). If the domain already has a record starting with v=spf1, edit that one instead of adding a second.
      Can a domain have two SPF records?
      No. With two TXT records starting with v=spf1, receivers return PermError and SPF fails for all your mail (RFC 7208, section 3.2). Merge them into one: "Start from my current record" above does it for you.
      Should I use ~all or -all?
      Both protect the domain once DMARC is set. ~all (soft fail) asks receivers to accept but mark mail from other servers; -all (fail) asks them to reject it. Start with ~all while you check that every service is listed, then switch to -all if you want. Never use +all.
      What is the SPF 10 DNS lookup limit?
      Receivers stop after 10 DNS lookups while checking a record (include, a, mx, ptr, exists and redirect each cost one, plus the lookups inside every include). Over 10, the result is PermError and SPF fails. This generator counts them live, include by include, before you publish.
      Do I need to add Mailchimp, SendGrid or Postmark to my SPF record?
      Usually not. They send with their own return-path address, so receivers check the provider's SPF record, not yours. What makes their mail pass DMARC is DKIM (or a custom return path), set up in each service.
      What SPF record should a domain that sends no email have?
      v=spf1 -all: no server may send for it. Add a DMARC record with p=reject, and a null MX record (MX 0 .) if the domain receives no email either.

      Put this guide into practice

      Related Tools

      SPF Record Checker
      Validate the published record: include tree, 10-lookup count, IP test.
      DMARC Record Generator
      Next step: a DMARC policy, step by step to p=reject.
      DKIM Checker
      Make sure each service signs your mail with DKIM.
      Email Header Analyzer
      See the SPF result of a real message.