SPF and DMARC Records for Domains With or Without Email
Originally published on Sitecheckly. A domain can be spoofed even if it sends no email. For a non-sending domain, publish an SPF TXT record of v=spf1 -all and a DMARC TXT record of v=DMARC1; p=reject. The DMARC policy c
Originally published on Sitecheckly.
A domain can be spoofed even if it sends no email. For a non-sending domain, publish an SPF TXT record of v=spf1 -all and a DMARC TXT record of v=DMARC1; p=reject. The DMARC policy can also apply to subdomains without their own policy, so check legitimate subdomain senders before enforcing it. These tell participating receivers that no servers are authorized to send and request rejection of messages that fail DMARC. They do not guarantee that every forged message will be rejected. See the SPF specification and the current DMARC, aggregate reporting and failure reporting specifications, which replace the obsolete DMARC specification, RFC 7489.
Why add SPF and DMARC if your domain sends no email?
Not using email does not stop someone from putting your domain in a forged sender address. Publishing SPF and DMARC records gives receiving mail systems an explicit policy instead of leaving them to assess a domain with no published email authentication policy.
The records serve different purposes:
- SPF identifies hosts authorized to send mail using a domain in the SMTP envelope identity. It does not, by itself, authenticate the visible From address.
- DMARC checks whether a successful SPF or DKIM authentication result aligns with the visible From domain. It also communicates how you want receivers to handle messages that fail that check.
Receiving systems still decide how to apply the requested policy. Treat these records as protection against unauthorized use of your domain, not a promise to stop every deceptive email.
Survey scope and method: The October 2026 Sitecheckly survey used the Tranco top 10,000, Tranco list 7462X. The ranking covers 2026-10-02 to 2026-10-31, and home pages were fetched on 2026-11-01. Analysis was possible for 4,934 of 10,000 domains. The remainder were mostly CDN, DNS and API hosts, sites whose robots.txt asked crawlers to stay away, or sites that blocked automated requests. See the survey methodology.
In the survey, 24% of the 4,157 analyzed sites had no DMARC record. SPF was missing from 19% of the 3,591 analyzed sites checked for that issue. These findings use different analyzed groups, so do not treat their denominators as interchangeable. More findings are available in the related website security statistics.
What SPF and DMARC records should a non-sending domain use?
First, confirm that the domain really sends no email. Check with anyone responsible for:
- Website contact forms and form notifications.
- Password resets, receipts and other transactional messages.
- Marketing platforms and customer support tools.
- Business mailboxes and third-party services that send on your behalf.
Do not apply a non-sending policy simply because nobody uses a mailbox at the domain. A website or external service may still send messages using it.
For a confirmed non-sending domain, publish this TXT value at the domain root:
v=spf1 -all
This is often called a null SPF record or an SPF record for no email. The -all mechanism states that no sending host is authorized by this policy.
Then publish this TXT value at _dmarc:
v=DMARC1; p=reject
The DMARC reject policy requests rejection of messages that fail DMARC. DMARC can pass through either aligned SPF or aligned DKIM authentication; it does not require both to pass.
These are separate TXT records at separate names. Do not paste the SPF and DMARC values into the same record.
How do you add the records in Cloudflare DNS?
Before editing anything, inspect the existing TXT records. Save the current values so you have a record of what changed.
In Cloudflare, select the domain and open DNS, then Records. Use Add record to create the required TXT records, following Cloudflare's DNS record creation instructions.
For the SPF record, select TXT, enter @ in the Name field, and use this content:
v=spf1 -all
For the DMARC record, select TXT, enter _dmarc in the Name field, and use this content:
v=DMARC1; p=reject
Save each record.
If an SPF record already exists, edit it instead of adding another. Multiple TXT records beginning with v=spf1 at the same name cause an SPF permanent error. That restriction concerns SPF policies, not unrelated TXT records. The SPF record selection rules explain this behavior.
Also inspect any existing _dmarc policy before replacing it. Preserve intentional reporting or subdomain settings unless you have decided to change them.
How do you add the records at another DNS provider?
Open the record editor at the provider that hosts your authoritative DNS. This may be different from the company where you registered the domain.
The target records are the same as in the Cloudflare example:
- A root-domain TXT record containing the non-sending SPF policy.
- A TXT record at
_dmarccontaining the DMARC reject policy.
The interface labels may differ. Check your provider's instructions for the host-name field before saving. Some editors use @ for the domain root and append your domain to other names automatically. Others expect a full name.
For example, if your domain is example.com, the completed DMARC record name should be _dmarc.example.com. Check the saved name rather than assuming the editor interpreted your entry correctly.
Update an existing policy rather than creating competing SPF or DMARC records. If you find an existing mail-provider authorization, pause and identify who uses it before replacing it with a non-sending policy.
What changes when your domain uses a mail provider?
A null SPF policy is not appropriate when your domain authorizes sending hosts. Inventory every legitimate sender, then follow each provider's SPF and DKIM instructions.
For a domain that sends only through Google Workspace, Google's example SPF value is:
v=spf1 include:_spf.google.com ~all
If other services also send mail, incorporate their required authorizations into the same SPF record. Do not add a separate SPF record for each provider. Follow Google's SPF setup guidance rather than assuming the Google-only example covers your entire setup.
DKIM and alignment also matter. A message can pass an authentication check without satisfying DMARC if the authenticated domain does not align with the visible From domain.
For a sending domain, use this rollout sequence:
- List legitimate senders. Include applications, forms and external platforms, not just employee mailboxes.
- Configure SPF and DKIM. Use the instructions provided by each sending service.
- Check alignment. Confirm that real messages pass DMARC through aligned SPF or DKIM.
-
Monitor if needed. A
p=nonepolicy can be used while you review authentication results. Configure aggregate reporting if you want to receive reports; the policy alone does not specify a reporting destination. - Move to enforcement. Apply a reject policy once legitimate senders are accounted for and tested.
The current DMARC specification covers alignment and policy deployment, with reporting covered by the aggregate reporting and failure reporting specifications. A monitoring policy is useful during setup, but it is not a request to reject failing messages.
How can you check your records?
Use the free DMARC checker to check the published DMARC policy. When building or changing an SPF policy, use the free SPF record generator.
Then test actual mail if the domain sends it. Send messages from every legitimate service and inspect the receiving system's authentication results. Confirm that DMARC passes through aligned SPF or DKIM. A correctly published DNS record does not prove that every sending service is configured correctly.
You can also run a free security audit for a broader check of the page you enter. Sitecheckly's security audit is passive, requires no sign-up, and covers one URL per run. It is not a substitute for testing email delivery and authentication.
What to do next
- No email is sent: confirm that no hidden application or service sends mail, then publish the non-sending SPF and DMARC records.
- Email is sent: inventory providers, configure authentication and verify alignment before enforcing rejection.
- Records already exist: inspect and update them instead of adding duplicates, then check the published result.
Frequently asked questions
Does SPF protect the visible From address by itself?
Not necessarily. DMARC checks whether an authenticated SPF or DKIM identity aligns with the visible From domain. Source
Does a DMARC reject policy apply to subdomains?
An organizational domain's DMARC policy can apply to subdomains when they do not publish their own policy. The sp tag can specify a separate subdomain policy. Source
Can I publish two SPF records for different mail providers?
No. Combine the authorizations into one SPF record for the same domain name; multiple records that select SPF cause a permanent error. Source
Will a DMARC reject policy stop all spoofed email?
No. DMARC communicates a policy to receivers, which decide how to apply it; it also depends on authentication and alignment checks. Source
Want to see how your own site does? Run a free audit at sitecheckly.com.
Figures in this article come from Sitecheckly's own audit data; see the methodology.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.