SPF and DMARC Record Generator

Build the TXT record for your domain with a form. You get the host and value to paste into your DNS panel. Everything is generated in your browser and no DNS lookups are made.

Updated November 19, 2026

SPF record

Services that send mail for you.

Type: TXT   Host / name: @ (your domain)
Value:
v=spf1 include:_spf.google.com ~all

DNS lookups counted: 1 of 10 · 35 characters

How to use it

  1. Pick SPF or DMARC and fill in the form. Start with ~all and p=none if you are unsure.
  2. Copy the value and add a TXT record at the host shown: @ for SPF, _dmarc for DMARC.
  3. Wait for DNS to update, then check it with the DNS propagation checker.

Worked examples

  • Google Workspace plus one server, hard fail: v=spf1 ip4:203.0.113.10 include:_spf.google.com -all (1 lookup).
  • Strict DMARC with reports: v=DMARC1; p=reject; sp=quarantine; pct=50; rua=mailto:dmarc@example.com; ruf=mailto:f@example.com; adkim=s; aspf=s; fo=1.

Securing your site too? Check its certificate with the SSL certificate checker.

See also

Frequently Asked Questions (FAQ)

What is an SPF record?

An SPF record is a TXT record on your domain that lists the servers allowed to send email for it. Receivers check the sending server against the list and treat mail from other servers according to the ending: -all (fail), ~all (soft fail) or ?all (neutral).

Should I use ~all or -all?

~all (soft fail) is the safe choice while you are still finding every service that sends mail for you. Once you are sure the list is complete, -all tells receivers to reject everything else. With DMARC in place, either works well in practice.

What is the SPF 10 DNS lookup limit?

SPF allows at most 10 DNS lookups while evaluating a record. include, a, mx, ptr, exists and redirect each count, and so do the lookups inside each include. Going over gives a permerror and SPF fails. ip4 and ip6 entries cost nothing, so flatten providers to IPs if you are near the limit. The generator counts the lookups it can see; nested includes inside providers are not looked up.

Can I have more than one SPF record?

No. A domain must publish exactly one SPF TXT record. Two records cause a permerror. Combine every include and IP into one record.

What DMARC policy should I start with?

Start with p=none and a rua address to collect aggregate reports without affecting delivery. When the reports show all legitimate mail passing SPF or DKIM with alignment, move to p=quarantine, then p=reject, optionally ramping with pct.

Where do I publish the records?

In your DNS provider as TXT records. SPF goes on the root of the domain (host @). DMARC goes on the host _dmarc. Changes can take a while to spread, which you can watch with the DNS propagation checker.

Does this tool look up my DNS?

No. It only builds the text of the record in your browser. Nothing is sent anywhere and no DNS queries are made.