1. Home
  2. Developer tools
  3. DMARC, SPF and DKIM Record Generator

DMARC, SPF and DKIM Record Generator

Set up e-mail authentication for a domain without hand-writing records. Choose your senders and policy, then copy the TXT values.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use DMARC, SPF and DKIM Record Generator

  1. Choose SPF, DMARC or DKIM.
  2. Select senders, policy and reporting address, or paste a DKIM public key.
  3. Copy the record to your DNS host.

Features

  • Presets for common mail providers
  • SPF DNS lookup count against the limit of 10
  • DMARC policy, subdomain policy, percentage and alignment
  • DMARC rating with advice
  • DKIM record from an RSA or Ed25519 public key
  • Zone-file line split into 255-character strings

Supported formats

Input

  • Domain, senders, policy
  • DKIM public keys

You get

  • SPF, DMARC and DKIM TXT records

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the DMARC, SPF and DKIM Record Generator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • The tool builds the text only; it cannot publish records or check that they work.
  • SPF lookup counts include only the terms you add, not the lookups made by included services.

Guide

Setting up SPF, DKIM and DMARC records for a domain

Anyone can type any address into the From line of an e-mail, which is why forged messages are so common. Three DNS records let a domain owner fight that. SPF lists the servers allowed to send mail for the domain. DKIM adds a signature that receivers verify with a public key you publish. DMARC ties the two together, tells receivers what to do when a message fails both and where to send reports. This page builds all three, with the details that cause most mistakes handled for you.

SPF

An SPF record is a TXT record that starts v=spf1, followed by mechanisms and an ending. Pick the services that send mail for you from the list and the page adds their include: terms. Add your own servers as ip4: and ip6: ranges, and tick a or mx to allow the servers at the domain’s address or mail records. The ending ~all marks everything else as a soft fail, -all as a hard fail and ?all as neutral, which gives no protection. The sample produces v=spf1 ip4:203.0.113.5 include:_spf.google.com include:sendgrid.net ~all for example.com.

The 10-lookup limit

RFC 7208 allows at most ten DNS lookups while evaluating an SPF record. Each include, a, mx and redirect costs one, and the included records add their own. Go over the limit and the check ends in a permanent error, which most receivers treat as a failure, so a long list of marketing tools can silently break your mail. The page tells you how many lookups your own terms use. Big providers add more behind the scenes, so confirm the real total with the SPF Record Checker after publishing.

DMARC

A DMARC record lives at _dmarc.yourdomain. Its policy p says what to do with failing mail: none only reports, quarantine asks receivers to treat it as suspicious, reject asks them to refuse it. sp sets a different policy for subdomains, pct applies the policy to a percentage of failing mail, and adkim and aspf choose relaxed or strict alignment. The rua address receives daily aggregate reports. The safe route is to publish p=none with a rua address, read the reports for a few weeks to find every legitimate sender, fix SPF and DKIM for them, and only then tighten to quarantine and reject, raising pct in steps.

DKIM

You generate a key pair on the system that signs your mail, or use the one your provider gives you, and publish the public key. Choose a selector, a label such as mail2026, paste the public key in PEM or Base64, and the page writes the record name mail2026._domainkey.example.com and the value v=DKIM1; k=rsa; p=…. Long values must be split into strings of at most 255 characters in a zone file, and the page provides the split line. A warning appears for RSA keys shorter than 2048 bits. Never paste a private key.

Limits

The page builds the text only; it cannot publish it, check that it resolves or test your mail flow. SPF lookups inside included services are not counted. Records for several mail providers need testing with real messages and with the checkers.

Checked against the current version of the DMARC, SPF and DKIM Record Generator on .

Frequently asked questions

Where do I publish these records?

At your DNS provider as TXT records. SPF goes on the domain itself (the host @), DMARC on _dmarc.yourdomain, and DKIM on selector._domainkey.yourdomain. Allow up to a few hours for caches to expire, then test with the checkers on this site.

Should I use ~all or -all at the end of SPF?

Start with ~all (soft fail), watch the DMARC reports, and switch to -all (hard fail) only when you are sure every legitimate sender is listed. Receivers treat both as failures, but a hard fail leaves little room for mistakes.

Which DMARC policy should I start with?

Start with p=none and aggregate reports, find all legitimate senders, then move to quarantine and finally reject in steps, checking reports between steps.

Can a domain have two SPF records?

No. Two SPF records at the same name cause an error. Merge all senders into a single record.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.