Skip to content
SPF, DKIM & DMARC Generator

SPF Record Generator, DKIM and DMARC generator for your domain

With this SPF Record Generator, DKIM and DMARC generator, you can create your domain’s three email records in one form: select email providers and your own servers, generate a DKIM key in your browser or use one from your provider, and choose a DMARC policy. You’ll get ready-to-use TXT records such as v=spf1 mx include:_spf.google.com ~all.

Built by Florian Galz

Free and no sign-in required — the records are generated in your browser, and your private DKIM key is never sent to ZAP-Hosting.

Your own mail server? On a VPS, you control the sending IP, DKIM key and reverse DNS.

Optional: Use “Load existing records” to import your current SPF and DMARC records instead of starting from scratch.

Email providers
Sending services for newsletters and system emails

Your own mail server

One entry per line: IPv4/IPv6 addresses (including /prefix) become ip4/ip6; hostnames become includes.

Other servers are marked as suspicious; their emails usually end up in spam. A good choice alongside DMARC.

SPF record

example.com

Type

TXT

Name / Host

@

@ represents the domain itself.

Value

v=spf1 include:_spf.google.com ~all

TTL: 3600 seconds

1 of 10 allowed DNS lookups (excluding lookups within includes).

All records for your domain

Enter your domain above to tailor the names and records to it.

As a zone file
  • SPFTXT@
  • DMARCTXT_dmarc

DKIM is still missing: Generate a key in the DKIM tab or enter one from your provider.

Example result

What the finished records look like

Example inputs: Google Workspace as the mailbox provider, your own mail server at IP 203.0.113.10, a DKIM key generated in the browser with the selector mail, and DMARC set to quarantine. Your records depend on your inputs.

Example · Example with fictional domain example.com

Output: DNS records

Zone file for example.com (fictional)
example.com.                  3600  IN  TXT  "v=spf1 mx ip4:203.0.113.10 include:_spf.google.com ~all"mail._domainkey.example.com.  3600  IN  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqaU6zyZWRVBiwAjDI4mvIXO+qBJoYuua79iHhmLAkYYxy9xoR072J8pMfrwYkp3BVx3JC+zn8cM1RtJyRnoob+BaX2cczt+QEGx5sL1NSDo71eytzJKzJP1+u+FFexWH+7uirjM860kUBWJV3DV9OMyEV9dl0MEc18HJsI7BktHiYOISRKXbHpmEgvFbnU/Hg" "1rqG+BYdk7fHOPgD3NcCRESKSdgPxOMNx1cRY3vVTahsfeapCxEzaFpQmwK9VxPisgfo9QSR+EfV+S3nPvnVx2JpjV33sC5IyjOcjGsXjwFl0Xy8ly7voQjBDEPP/efmlA12z2eYCoZLJZ7Q7px1QIDAQAB"_dmarc.example.com.           3600  IN  TXT  "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"
  • SPF2 of 10 allowed DNS lookups; mail from other servers goes to spam thanks to ~all.
  • DKIMPublic 2048-bit key at mail._domainkey, split into 255-character chunks.
  • DMARCEmails that fail SPF and DKIM go to the spam folder; reports go to dmarc@example.com.

Basics

What SPF, DKIM and DMARC each do

Three DNS records that work together: learn how to read the generator's results and where each record belongs.

SPF record: who can send email

A TXT record placed directly on your domain that starts with v=spf1. It lists the servers and services allowed to send email for your domain. A domain can have only one SPF record.

DKIM record: the signature

Located at selector._domainkey on your domain. It contains the public key (v=DKIM1) or, for providers such as Microsoft 365, a CNAME reference. Recipients use it to verify each email's signature.

DMARC record: the policy

Located at _dmarc on your domain and starts with v=DMARC1. It determines what happens to emails that fail both SPF and DKIM and where reports are sent.

Features

Everything for SPF, DKIM and DMARC in one generator

Instead of using three separate generators, create all your domain’s email records in one place, with warnings about common mistakes.

13 email providers as templates

Google Workspace, Microsoft 365, IONOS, STRATO, Proton, Mailgun, SendGrid, Brevo, Amazon SES and more: one click adds the right SPF include. On the DKIM tab, the template fills in selectors where the provider specifies them.

Your own mail server

IPv4 and IPv6 addresses and entire networks become ip4 and ip6 entries; hostnames become includes. Use mx and a to allow the servers associated with your domain.

Checks the lookup limit

An SPF record can trigger at most 10 DNS lookups. The generator counts top-level lookups and warns you if your record exceeds the limit and would result in a permerror.

DKIM key in your browser

The RSA key pair (2048 or 1024 bits) is generated in your browser. You download the private key; it is never sent to ZAP-Hosting. You also get the OpenDKIM configuration lines.

DMARC with reports

Choose a policy of none, quarantine or reject, a separate rule for subdomains, reporting addresses and alignment. For reports sent to another domain, the tool shows the authorization record you need.

Copy or add directly

Copy each record individually or all of them as a zone file. If your domain is with ZAP-Hosting, you can sign in and add all the records at once. You'll see which records are new and which will replace existing ones before you proceed.

How it works

How to create SPF, DKIM and DMARC records

Enter your domain, fill in the three tabs and add the records. You only need an account to add them directly.

Step 1

Enter domain

Enter your domain. Use “Load existing records” to import your current SPF and DMARC records instead of creating a second one.

Step 2

Create SPF record

On the SPF tab, select your email providers and sending services, enable mx or a for your own server, and enter any additional IPs or hostnames. Below, you can see how many DNS lookups the record requires.

Step 3

Set up a DKIM key

Generate a key pair in your browser on the DKIM tab and download the private key, or select your email provider and enter its DKIM value.

Step 4

Create a DMARC record

On the DMARC tab, choose the none, quarantine or reject policy, the subdomain policy and a reporting address (rua).

Step 5

Use records

Copy the type, name and value of each record into your provider's DNS management, copy everything as a zone file, or add the records directly to your ZAP-Hosting domain.

Step 6

Check publication

Once the new records are visible in DNS, check your domain's SPF, DKIM and DMARC in the Email DNS Health Checker.

Discover more

After generating: check your records and monitor your domain

FAQ

Frequently asked questions about the SPF, DKIM and DMARC Generator

Quick answers about SPF records, DKIM keys and DMARC policies.

Three DNS records that let receiving mail servers check whether an email really comes from your domain. SPF lists the servers allowed to send, DKIM signs each email with a key, and DMARC determines what happens to emails that fail both checks. Gmail and Yahoo require all three for high-volume senders.

On the SPF tab, select your mailbox providers and sending services, enable mx or a for your own server, and enter any additional IPs or hostnames. The generator builds a record that starts with v=spf1 and ends with ~all, -all or ?all. A domain can have only one SPF record: if you already have one, load and extend it with “Load existing records” instead of creating a second.

The templates cover 13 providers. For any other provider, enter its SPF hostname from the provider's instructions in the “Additional IPs and services” field. The generator turns it into an include. IP addresses become ip4 or ip6. In the DKIM tab, select “Other provider” and enter the selector and value.

The SPF standard (RFC 7208) sets this limit: include, a, mx, ptr, exists and redirect each trigger a lookup, and an include can contain more. From the eleventh lookup onward, mail servers treat the record as a permerror, and SPF fails. The generator counts top-level lookups. If you’re nearing the limit, replace includes with fixed ip4 and ip6 entries.

On the DKIM tab, select “Generate key”, enter a selector such as mail, choose 2048 or 1024 bits, and click “Generate key pair”. Add the public part as a TXT record at selector._domainkey. Download the private key and put it on your server. The tool also shows the corresponding OpenDKIM KeyTable and SigningTable lines. The key pair is generated only in your browser.

Your provider generates the key: for Google Workspace, in the Admin console under Gmail > Authenticate email; for Microsoft 365, in the Defender portal under Email authentication. Google provides a TXT value, while Microsoft provides two CNAME targets for selector1 and selector2. Select the provider in the DKIM tab and enter the values.

Start with p=none and a reporting address (rua) to see who's sending email on your behalf for a few weeks. Once all legitimate senders pass SPF or DKIM, switch to p=quarantine (spam folder) and then p=reject (rejected). Only these two policies protect against spoofed senders. If reports go to another domain, the generator shows the TXT record that domain needs to authorize receipt.

Yes. You can generate records, create DKIM keys and copy them without signing in. You only need to sign in to add records directly to a domain whose DNS is managed by ZAP-Hosting. Before you do, the tool shows which records are new and which will replace an existing SPF, DKIM or DMARC record. You can then check whether everything is published correctly for free in the Email DNS Health Checker. Go to Email DNS Health Checker

Any more questions?

Contact Support
Your own mail server?

Run your mail server on your own VPS

With a ZAP-Hosting VPS, you control the sending IP, reverse DNS and DKIM key, and can send email without a third-party mail hosting provider.

4.4/5 Trustpilot32,000+ Active serversSince 2010

No setup. No risk. Online in seconds.

Flexible TermCancel anytimeOnline in 60 seconds

Looking for more tools? View all network tools