SPF, DKIM & DMARC Record Generator

Email authentication is no longer optional. Google, Yahoo, and corporate mailbox gateways automatically reject or spam-fold outbound messages that lack verified Sender Policy Framework (SPF), cryptographic DKIM signatures, and an enforced DMARC policy. This free generator builds RFC-compliant DNS TXT records customized for your sending infrastructure, monitors your RFC 7208 10-lookup limit in real time, and audits your compliance readiness. Everything runs locally in your browser with zero data transmission or storage.

Free deliverability tool · 100% private in-browser

Generate SPF, DKIM & DMARC DNS records

Build copy-paste DNS authentication records in seconds. Audit DNS lookup limits, meet Google & Yahoo sender mandates, and protect your domain reputation.

  • SPF 10-Lookup Budget
  • DKIM 2048-Bit Signing
  • DMARC Spoof Defense
  • Google & Yahoo Mandates

Domain & sending infrastructure

Enter your apex domain or subdomain. Protocols like https:// and paths are stripped automatically.

Select the platforms that send email on behalf of your domain to inject their authorized SPF includes.

SoftFail (~all) is industry standard because indirect forwards (e.g. alumni redirects) pass via DKIM alignment while preserving strict security.

Host will be s1._domainkey. You can paste your provider's public key or use the generated RFC template.

Start with quarantine for production protection. Google and Yahoo mandate at least p=none with a reporting address.

Receives daily XML authentication reports. Auto-suggested when entering your sending domain.

Deliverability & compliance score

Enter your outbound sending domain to calculate authentication readiness, audit DNS lookups, and generate copy-paste records.

0 out of 100

— Enter domain to evaluate

Evaluating bulk sender compliance...

  • SPF DNS Lookups 0 / 10
  • DMARC Policy Quarantine
  • DKIM Status 2048-bit
  • Records Built 3 TXT
RFC 7208 Lookup Budget: 2 / 10 Lookups (Safe)

RFC 7208 strictly limits SPF evaluation to 10 DNS queries. Senders exceeding 10 receive immediate PermError failures.

Generated DNS authentication records (copy-ready)

SPF Record Type: TXT
1 DNS Lookup
Host / Name:
@
Record Value:
v=spf1 mx ~all
TTL: 3600 (1 hour). Place on your root apex or designated sending subdomain.
DKIM Record Type: TXT
0 Lookups (Cryptographic)
Host / Name:
s1._domainkey
Record Value:
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...IDAQAB
Publish your ESP's public key here. If using CNAME delegation (e.g. M365), map selector CNAME instead.
DMARC Record Type: TXT
0 Lookups (Policy TXT)
Host / Name:
_dmarc
Record Value:
v=DMARC1; p=quarantine; rua=mailto:[email protected]; pct=100; aspf=r; adkim=r; fo=1
DMARC aligns SPF & DKIM. Aggregate reports are delivered to your RUA mailbox daily.
BIND / DNS Zone File Export (Standard RFC 1035 Format)
; Enter sending domain above to compile complete BIND zone file...

Deliverability audit & RFC guidance

  • Info Enter your outbound sending domain above to trigger real-time RFC 7208 lookup auditing, Google & Yahoo compliance verification, and anti-spoofing policy checks.

The Three Pillars of Email Authentication: SPF, DKIM, and DMARC

Every commercial, marketing, and transactional email sent across the internet relies on three fundamental protocols to prove its authenticity: Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM), and Domain-based Message Authentication, Reporting, and Conformance (DMARC). Working together in a defense-in-depth model, these protocols allow mailbox providers like Google, Microsoft, and Yahoo to verify that an email claiming to come from your domain was genuinely authorized by you, and has not been tampered with in transit.

Without these records published in your domain's Domain Name System (DNS), bad actors can easily spoof your sender address to launch phishing campaigns, impersonate executives, and scam customers. In response to skyrocketing spoofing attacks, the email industry enacted strict mandates that automatically divert unauthenticated messages away from inboxes and straight into junk folders or outright rejection.

Google and Yahoo 2024+ Bulk Sender Mandates Explained

Beginning in February 2024, Google and Yahoo introduced mandatory authentication enforcement for all senders, with heightened requirements for anyone dispatching 5,000 or more emails per day to Gmail or Yahoo addresses. These rules are no longer recommendations; failing to satisfy them results in immediate deliverability degradation or fatal 550 SMTP rejection codes.

To ensure guaranteed inbox delivery, every outbound domain must fulfill three baseline DNS requirements:

  1. Publish a valid SPF record authorizing all outbound IP addresses and third-party email service providers (such as Google Workspace, SendGrid, Amazon SES, or Postmark).
  2. Implement DKIM with at least 1024-bit (and strongly recommended 2048-bit) RSA keys so that every message is cryptographically signed by the sending domain.
  3. Publish a DMARC policy record at the host _dmarc with an active reporting URI (the rua= tag) to collect daily aggregate telemetry on authentication pass/fail rates.

Additionally, bulk senders must maintain a user-reported spam rate below 0.10% (and never exceed 0.30%), support one-click unsubscribe headers (RFC 8058), and ensure forward and reverse DNS (PTR) alignment on sending mail servers.

Authentication Protocol Comparison: SPF vs DKIM vs DMARC

The following comparison table breaks down how each protocol operates, where it lives in your DNS zone, and its specific role in protecting your domain reputation:

Protocol Standard RFC DNS Type & Host Key Purpose DNS Lookup Cost Alignment Requirement
SPF RFC 7208 TXT at @ (apex) Authorizes server IP addresses and third-party ESPs allowed to send mail for domain Strict limit of 10 lookups (includes, mx, a) Return-Path (envelope from) must match From header domain
DKIM RFC 6376 TXT or CNAME at <selector>._domainkey Cryptographically signs message headers and body to detect tampering in transit 0 lookups against SPF budget (dedicated query) d= signature tag must match From header domain
DMARC RFC 7489 TXT at _dmarc Instructs receivers on how to treat mail failing SPF/DKIM; reports spoofing via XML 0 lookups against SPF budget (policy query) Requires SPF or DKIM to pass AND align with user-visible From address

Deep Dive: SPF (RFC 7208) and the Critical 10-Lookup Limit

Sender Policy Framework works by publishing an authorized list of IP addresses and server hostnames permitted to transmit messages on behalf of your domain. When a mail transfer agent (MTA) receives an incoming message, it inspects the RFC 5321 Return-Path (envelope sender) address, queries the SPF record for that domain, and checks whether the transmitting IP is authorized.

The 10 DNS Lookup Limit

To protect recipient mail servers from Denial of Service (DoS) attacks caused by recursive DNS loops, RFC 7208 §4.6.4 establishes a hard limit: an SPF evaluation must not require more than 10 DNS lookups. Each of the following mechanisms triggers a DNS query that counts toward this ceiling:

  • include: — Queries the SPF record of the referenced domain (+1 lookup, plus any nested lookups inside that record).
  • a or a:domain — Resolves A or AAAA records for the host (+1 lookup).
  • mx or mx:domain — Resolves MX records for the host (+1 lookup).
  • ptr — Reverse DNS query (+1 lookup; strongly deprecated by RFC 7208 due to performance and reliability risks).
  • exists: — Tests for the presence of a DNS A record (+1 lookup).
  • redirect= — Delegates evaluation to another domain (+1 lookup).

Conversely, ip4:, ip6:, and the terminal all mechanism do not trigger DNS queries. If your domain exceeds 10 lookups (for example, by stacking Google Workspace, SendGrid, HubSpot, and Mailchimp in a single record), mail servers abort SPF processing and return a fatal PermError. Under strict DMARC, this causes legitimate emails to bounce.

Why SoftFail (~all) is the Industry Standard

SPF records conclude with an enforcement qualifier. While novice administrators frequently assume HardFail (-all) is "more secure," deliverability specialists universally recommend SoftFail (~all) for modern email infrastructure. When an email is forwarded (for example, through an alumni forwarding service, a business mailing list, or an automated inbox rule), the forwarding server's IP address is not in your SPF record. A HardFail policy causes the message to be dropped immediately. With SoftFail, the message is accepted, DKIM signature verification survives the forward intact, and DMARC passes via cryptographic alignment.

Deep Dive: DKIM (RFC 6376) and Cryptographic Signatures

DomainKeys Identified Mail eliminates the vulnerabilities of IP-based authentication by using asymmetric public-key cryptography. When your email server or ESP sends an email, it creates a digital signature using your private key and embeds it into the message headers under the DKIM-Signature header. The header contains the signature, canonicalization algorithms, signed header list, domain (d=), and selector (s=).

Understanding DKIM Selectors

Because an organization may use multiple sending services simultaneously (such as Google Workspace for day-to-day employee email and SendGrid for automated receipts), DKIM uses selectors to separate keys. The receiving server constructs the DNS query by prepending the selector to ._domainkey.yourdomain.com.

1024-Bit vs 2048-Bit RSA Keys

While 1024-bit RSA keys were common historically, modern compute capabilities render 1024-bit keys susceptible to factoring attacks. Both Google and Yahoo require a minimum of 1024 bits and strongly urge 2048-bit keys for all active senders. Our generator outputs standard 2048-bit RSA key templates to guarantee compliance with modern cryptographic standards.

Deep Dive: DMARC (RFC 7489) Policy Progression

SPF and DKIM alone have a significant flaw: neither dictates what the receiving server should do if authentication fails. Furthermore, neither verifies that the technical envelope sender matches the human-readable From: address displayed in the user's email client. DMARC bridges this gap by introducing Identifier Alignment and policy enforcement.

The Safe DMARC Rollout Pipeline

Never implement DMARC with p=reject immediately on an established domain without prior monitoring. Doing so risks blocking critical internal systems, CRM notifications, and accounting software. Follow this proven three-stage progression:

  1. Stage 1: Monitoring (p=none) for 30–60 Days — Publish your DMARC record with p=none; rua=mailto:[email protected]. In this mode, no emails are blocked. Receiving servers send daily XML telemetry detailing every IP sending mail under your brand and whether SPF and DKIM passed. Use these reports to identify unauthenticated third-party services.
  2. Stage 2: Quarantine (p=quarantine; pct=100) for 30 Days — Once all legitimate sending streams pass SPF and DKIM alignment, upgrade your policy to p=quarantine. Unauthorized or spoofed messages will now be diverted to recipient Spam and Junk folders rather than reaching the inbox.
  3. Stage 3: Full Rejection (p=reject; pct=100) — Upgrade to p=reject to achieve complete anti-spoofing defense. Any incoming email failing both SPF and DKIM alignment is rejected at the SMTP gateway, shielding your brand from phishing, BEC (Business Email Compromise), and impersonation.

Common DNS Configuration Mistakes to Avoid

Deliverability audits regularly uncover simple DNS syntax errors that cripple email delivery. Avoid these six common pitfalls:

  • Publishing Multiple SPF Records: A domain must have exactly one SPF TXT record. If your DNS contains two records (e.g. one for Google and one for SendGrid), receiving servers treat SPF as invalid (PermError) and reject both. Combine all authorized sources into a single v=spf1 ... string.
  • Omitting the DMARC RUA Tag: Publishing v=DMARC1; p=none without an rua=mailto:... address satisfies basic syntax but provides zero visibility. Without aggregate reports, you cannot diagnose delivery failures or detect active spoofing attempts.
  • Exceeding the 255-Character TXT String Limit: In DNS zone files, a single character string within a TXT record cannot exceed 255 octets (RFC 1035). If your SPF record grows beyond 255 characters, it must be broken into multiple double-quoted strings within the same record (e.g. "v=spf1 ... part1" "part2 ~all").
  • Entering Full FQDN in Provider Host Fields: Some DNS managers (like GoDaddy, Cloudflare, and Namecheap) automatically append your apex domain to the host field. If you enter _dmarc.yourdomain.com, the provider may register it as _dmarc.yourdomain.com.yourdomain.com. Always verify whether your provider expects _dmarc or the full domain.
  • Ignoring DKIM CNAME Trailing Dots: If your ESP (such as Microsoft 365 or Amazon SES) provides CNAME records for DKIM delegation, ensure trailing dots are included where required by BIND/DNS providers to avoid hostname doubling.
  • Neglecting Subdomain Policies: If you send outreach from a dedicated subdomain (e.g. outreach.company.com), publish dedicated SPF and DKIM records on that subdomain. DMARC published on the apex will cover subdomains unless a specific sp= tag is defined.

How to Add Records in Popular DNS Providers

Once you generate your records, copy and paste them into your DNS management console:

  1. Cloudflare: Navigate to DNS → Records → Add Record. Set Type to TXT, Name to @ (for apex SPF), TTL to Auto, and paste the Content. Repeat for DKIM (Name: selector._domainkey) and DMARC (Name: _dmarc).
  2. GoDaddy: Open Domain Portfolio → DNS. Click Add New Record, select TXT, set Name to @ (for SPF) or _dmarc (for DMARC), and TTL to 1 Hour.
  3. Namecheap: Go to Advanced DNS → Host Records → Add New Record. Select TXT Record, enter Host @, Value v=spf1 ..., and TTL Automatic.
  4. Google Cloud DNS / AWS Route 53: Create a new Record Set, choose Type TXT, set Routing Policy to Simple, and enclose multiline or long values in double quotes.

Frequently Asked Questions

Can I have more than one SPF record on my domain?

No. RFC 7208 §3.2 explicitly dictates that a domain must not publish multiple SPF TXT records. If a receiver encounters more than one SPF record starting with v=spf1, it terminates evaluation immediately with an SPF PermError. To authorize multiple providers (such as Google Workspace and SendGrid), combine them into a single record: v=spf1 include:_spf.google.com include:sendgrid.net ~all.

What happens if I exceed the 10 DNS lookup limit in SPF?

If the evaluation of your SPF record requires more than 10 DNS queries, recipient mail transfer agents flag the message with spf=permerror. Under standard DMARC rules, if SPF returns a permanent error and DKIM is missing or fails, the email will be quarantined or rejected. To avoid this, use dedicated subdomains for different mail streams, or replace domain-based include: mechanisms with static ip4: blocks when using dedicated sending IP addresses.

What is the difference between DMARC rua and ruf reports?

The rua tag (Aggregate Reports) delivers daily summaries containing statistical data on sending IP addresses, message volumes, SPF results, and DKIM verification. These reports do not contain email content and are designed for deliverability monitoring. The ruf tag (Forensic/Failure Reports) requests real-time redacted copies of individual messages that failed authentication. Due to GDPR and privacy concerns, most mailbox providers (including Gmail and Yahoo) no longer generate ruf reports, making rua the critical tag to maintain.

Why does DKIM not count toward the SPF 10-lookup limit?

DKIM operates on an entirely distinct DNS branch and lookup model. While SPF is queried at the domain apex or envelope sender during SMTP connection negotiation, DKIM is queried only after the message body is received, using a specific selector host (<selector>._domainkey.domain.com). Because DKIM queries are isolated single lookups indexed by selector, they do not trigger recursive include chains and are exempt from RFC 7208 limits.

How long does it take for new DNS records to take effect?

DNS propagation depends on the Time to Live (TTL) configured in your DNS zone. For newly created records, changes typically take effect within 15 to 60 minutes globally. If you are modifying an existing record, receiving DNS resolvers cache the previous value until the old TTL expires, which can take anywhere from 1 hour to 24 hours. Always set TTL to 3600 seconds (1 hour) or lower before initiating authentication updates.

Does DMARC eliminate email spam?

DMARC does not filter spam based on content; its sole purpose is to prove domain authenticity and stop domain spoofing. DMARC ensures that an attacker cannot forge your exact brand name in the From: address. However, spammers can still send messages using lookalike domains (such as c0mpany.com instead of company.com). For complete protection, pair robust authentication with content filtering, SPF alignment, and proactive domain monitoring.

Related Deliverability Tools and Services

Building proper DNS records is the essential first step in safeguarding outbound email. Explore these companion deliverability tools to optimize your complete email setup: