# Protect Parked Domains & Non-Mail Hosts with Null SPF (v=spf1 -all), Null MX, and DMARC Reject

> Lock down parked domains, API/CDN subdomains, and defensive lookalike domains in 4 DNS lines using RFC 7208 v=spf1 -all, RFC 7505 Null MX, and DMARC p=reject.

- **Canonical URL**: https://opslint.dev/spf/null-spf-v-spf1-minus-all-parked-domains/
- **Category**: `SPF`
- **Interactive Workbench**: [Open in Live Workbench](https://opslint.dev/spf/#domain=example.com)
- **Normative Specifications**: `RFC 7208 §4.5 & §8.4 (Empty 'v=spf1 -all' Zero-Sender Policy)`, `RFC 7505 (A 'Null MX' No Service Resource Record for Domains That Accept No Mail)`, `M3AAWG Defensive DNS Authentication for Non-Sending Domains`

## Incident Symptom & Root Cause

**Production Symptom**: Phishing campaigns spoof invoices from your defensive lookalike domains (example-pay.com, example.io) or unauthenticated infrastructure hostnames (api.example.com, cdn.example.com) because no one ever configured email DNS records on domains that 'don't use email'!

**Protocol / Engine Root Cause**: In SMTP and DNS, the absence of SPF and DMARC records is treated by every mail server on Earth as 'no restriction published' (SPF=None, DMARC=None), allowing any IP address to forge mail from unused domains with zero cryptographic rejection!

## Remediation Diff (Broken vs Verified Fix)

### Unprotected Parked Domain or API Subdomain (Zero Email DNS Records!)

```text
; Default registrar zone on example-support.io or api.example.com:
; NO TXT v=spf1, NO _dmarc TXT, NO Null MX!
; Result: SPF = None, DMARC = None -> phishing spoofers land straight in customer inboxes!
api.example.com.     3600 IN A 203.0.113.80
```

### Complete 4-Record Lockdown for Non-Sending / Parked Domains

```text
; 1. Null SPF (0 DNS lookups, rejects 100% of IPv4 & IPv6 senders immediately):
parked-brand.io.               86400 IN TXT "v=spf1 -all"

; 2. Revoked Wildcard DKIM (signals any forged DKIM selector on this domain has an empty revoked key):
*._domainkey.parked-brand.io.  86400 IN TXT "v=DKIM1; p="

; 3. Strict DMARC Reject for both apex (p=reject) and ALL subdomains (sp=reject):
_dmarc.parked-brand.io.        86400 IN TXT "v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;"

; 4. RFC 7505 Null MX (tells remote MTAs immediately not to queue/retry inbound mail):
parked-brand.io.               86400 IN MX  0 .
```

## Engineering Deep Dive

The iron law of email security is paradoxical: domains that NEVER send email are the easiest and fastest domains in your portfolio to lock to 100% p=reject enforcement in five minutes flat, because zero legitimate mail streams can possibly break! Every company owns dozens of non-mail surfaces: .io/.net/.co brand redirects, staging domains (example-staging.com), static asset CDNs (static.example.com), and API endpoints (api.example.com).

Look at how all four defensive records reinforce one another with zero maintenance cost: v=spf1 -all rejects every envelope sender IP at zero DNS lookup cost; *._domainkey IN TXT "v=DKIM1; p=" uses RFC 6376 §3.6.1's empty p= key-revocation syntax across wildcard selectors; _dmarc IN TXT "v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;" instructs Gmail, Yahoo, and Microsoft to drop spoofed messages on both the apex and every arbitrary subdomain; and MX 0 . (RFC 7505 Null MX) stops external senders from queueing bounce retries for 5 days against your web server's A record if someone typos an email address!

Remember one critical rule about SPF non-inheritance on active corporate domains: even if your main example.com already has _dmarc.example.com with sp=reject, any subdomain on example.com that has an A, AAAA, or CNAME record (like api.example.com or www.example.com) still has SPF=None on its own envelope identity! Adding api.example.com IN TXT "v=spf1 -all" enables early pre-DATA SMTP rejection for envelope spoofs targeting bounce@api.example.com too (just remember you cannot place a TXT record directly on a hostname that is itself a CNAME).

## 4-Record Defensive DNS Bundle for Non-Sending Domains

| Case / Engine | Protocol Behavior | Production Remediation |
| :--- | :--- | :--- |
| **Apex TXT: "v=spf1 -all"** (`#null-spf-record`) | 0 DNS lookups; returns immediate SPF Fail (-all) for every IPv4/IPv6 client. | Deploy via Terraform across 100% of parked/redirect domains at registration time. |
| **Wildcard TXT: *._domainkey "v=DKIM1; p="** (`#null-dkim-wildcard`) | Explicitly declares any DKIM public key under _domainkey revoked per RFC 6376 §3.6.1. | Prevents confusion if old ESP CNAME/TXT selectors lingered before domain retirement. |
| **_dmarc TXT: "v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;"** (`#null-dmarc-strict`) | Enforces unconditional rejection across both organizational apex and all subdomains. | Include rua=mailto:dmarc@primary-corp.com (with _report._dmarc auth!) if spoofing telemetry is desired. |
| **Apex MX: 0 . (RFC 7505 Null MX)** (`#null-mx-rfc7505`) | Prevents RFC 5321 §5.1 fallback to apex A/AAAA record for inbound SMTP connection attempts! | Publish MX priority 0 target '.' on every domain that never receives inbound email. |

## Frequently Asked Engineering Questions

### Wait: if a domain has NO MX record at all, why do mail servers still try connecting to port 25 on our web server?

Great RFC 5321 §5.1 trivia! When a domain has zero MX records, the SMTP standard requires remote mail servers to fall back to the domain's implicit MX—its root A and AAAA records! Publishing RFC 7505 Null MX ('0 .') explicitly disables A/AAAA fallback and returns an immediate 550 permanent failure to the sender instead of retrying port 25 on your web load balancer for 4 days!

### If I add rua=mailto:dmarc@maincorp.com onto _dmarc.parked-brand.io, will reports arrive automatically?

Only after you publish an RFC 7489 §7.1 external report authorization TXT record at parked-brand.io._report._dmarc.maincorp.com IN TXT "v=DMARC1;" (or wildcard *._report._dmarc.maincorp.com IN TXT "v=DMARC1;")! Because parked-brand.io and maincorp.com are different organizational domains, receivers drop external rua reports without _report._dmarc verification.

### Where can we register defensive domains with programmable DNS APIs to automate these 4 records?

Use registrars with clean REST APIs or Terraform providers (such as Porkbun or AWS Route53) so every newly registered domain automatically receives the 4-record Null SPF / Null MX / DMARC reject template in CI.

## Related Problem-Cluster Guides

- [Stop Subdomain Phishing Attacks (@hr.example.com / @login.example.com) with DMARC sp=reject](https://opslint.dev/dmarc/subdomain-spoofing-protection-sp-reject-policy/) — Close the #1 enterprise DMARC blind spot where attackers bypass p=none on the apex domain by spoofing arbitrary nonexistent subdomains like @security.example.com.
- [Fix Missing DMARC Aggregate Reports: External rua Destination _report._dmarc Authorization](https://opslint.dev/dmarc/external-destination-rua-report-dmarc-authorization/) — Why Gmail, Yahoo, and Microsoft silently drop DMARC rua/ruf XML reports sent to another domain, and how to publish RFC 7489 §7.1 _report._dmarc TXT records.
- [SPF ~all (SoftFail) vs -all (HardFail) Under DMARC Enforcement: RFC Truth & Forwarding](https://opslint.dev/spf/softfail-tilde-all-vs-hardfail-minus-all-dmarc/) — Compare SPF ~all SoftFail, -all Fail, and ?all Neutral under RFC 7208 and RFC 7489 DMARC, including why forwarded DKIM-signed mail interacts differently with -all.
- [Fix SPF PermError: Too Many DNS Lookups (Exceeding the RFC 7208 10-Lookup Limit)](https://opslint.dev/spf/permerror-too-many-dns-lookups-10-limit/) — Understand which SPF mechanisms count toward RFC 7208 §4.6.4's hard 10-lookup ceiling, why nested vendor includes blow the budget, and how to cut lookups safely.
