SPF, DKIM, and DMARC generator.

Build the three TXT records that authenticate your domain, with live checks. Copy the host and value into your DNS provider.

Price
Free, no signup

The domain in your From address, or the bounce domain your provider uses.

One per line. Use the exact include each sending service documents.

Add

Sending with Bento? Copy the records from the DNS page in your Bento account instead. They are unique to your domain.

Single IPs or CIDR ranges. No lookup cost.

Single IPs or CIDR ranges. No lookup cost.

Off
Off

Optional. Advanced, macro-based checks.

Optional. Use another domain's SPF record instead.

Optional. Raw mechanisms added before all, separated by spaces.

Softfail. Unlisted servers fail softly and usually land in spam. Google recommends this.

SPF, DKIM, and DMARC generatorWaiting for input

Your SPF record appears here.

Enter your domain. The record, lookup count, and checks update as you type.

How this generator works.

Pick a tab, enter your domain, and fill in the fields. The record, its DNS host, and a list of checks update as you type. Everything runs in your browser, and nothing is sent anywhere.

  • SPF goes in a TXT record on your domain itself. It lists the services and IP addresses allowed to send as you.
  • DKIM goes in a TXT record at selector._domainkey on your domain. It holds the public half of the key that signs your mail.
  • DMARC goes in a TXT record at _dmarc on your domain. It sets your policy and where reports go.

Checks before you publish.

The SPF tab counts DNS lookups against the limit of 10 and flags ptr, duplicates, a misplaced all, and +all. Records longer than 255 characters are shown split into quoted strings, the form most DNS hosts accept.

The DMARC tab checks report addresses and tells you when a report mailbox on another domain needs an authorization record. The DKIM tab reads the key type and size and warns about short keys.

Publishing the records.

Add each record at your DNS host with a TTL of 3600 seconds. Some hosts want the full host name, and others add your domain for you, so enter only the part before it. Changes are often live within an hour, but can take up to 48 hours.

If you send with Bento, copy the records from the DNS page in your Bento account rather than building them here. They are unique to your domain, and you can verify them from the same page once they are live.

Common questions.

What is the difference between SPF, DKIM, and DMARC?
SPF lists the servers allowed to send mail for your domain. DKIM adds a signature that proves a message came from your domain and was not changed. DMARC checks that SPF or DKIM passes for the domain in the From address, tells receivers what to do when it does not, and sends you reports.
Do I need all three records?
Yes, if you send in volume. Google's sender guidelines require SPF, DKIM, and DMARC for anyone sending more than 5,000 messages a day to Gmail accounts, and every sender needs at least SPF or DKIM. All three together give receivers the clearest signal that your mail is really from you.
How many DNS lookups can an SPF record have?
Ten. The include, a, mx, ptr, exists, and redirect terms each cost one, and so does every include inside those includes. ip4, ip6, and all cost nothing. Past 10, receivers return a permanent error and SPF fails. This generator counts the top level. The SPF limit tester walks the full chain.
Can a domain have two SPF records?
No. Two TXT records that start with v=spf1 on the same name make SPF fail. When you add a new sending service, merge its include into your existing record instead of publishing a second one.
Should I end my SPF record with ~all or -all?
Either works once DMARC is in place. Google recommends ~all, which marks unlisted servers as a soft fail. Microsoft recommends -all alongside DKIM and DMARC. Never use +all, because it lets any server pass SPF as your domain.
What DMARC policy should I start with?
Start with p=none and a rua address so you get reports without changing delivery. Use the reports to find every service that sends as your domain and fix its alignment. Then move to quarantine, and finish at reject once no legitimate mail fails.
Should I generate my own DKIM keys?
Only for a mail server you run yourself. Email providers usually give you a DKIM record to publish and keep the signing key on their side. Bento lists a DKIM TXT record on the DNS page in your account. If you do make your own, use a 2048-bit RSA key.
Is it safe to generate a DKIM private key in the browser?
The key is made with your browser's built-in Web Crypto API. Nothing is sent to Bento or stored, and the key is gone when you close the page. Treat the private key like a password: install it on your mail server and do not share it.

Send from a domain inboxes trust.

Authentication setup and reputation monitoring are part of Bento, not an add-on. Plans start at $29/mo for up to 5,000 Active Users.