A domain you only use for a website, or one you keep parked, can still appear in the From line of a phishing email. Four DNS records tell every receiver that checks them that no mail from that domain is real.

The short answer

Publish four records: a null MX (MX 0 .) so nobody can deliver mail to the domain, v=spf1 -all so no server passes SPF, a DMARC record with p=reject, and an empty DKIM key at *._domainkey. Receivers that follow DMARC policies then reject any message that uses the domain in its From address.

The four records to copy

Replace example.com with your domain:

example.com.               MX   0 .
example.com.               TXT  "v=spf1 -all"
_dmarc.example.com.        TXT  "v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s"
*._domainkey.example.com.  TXT  "v=DKIM1; p="

This is the set the UK government publishes for its own domains that send no email, without its reporting tags (fo=1 and rua) [7]. The reserved domains example.com, example.net and example.org publish these same four records today [9].

In most DNS panels you enter them like this:

Type Host Value
MX @ (or empty) priority 0, target .
TXT @ v=spf1 -all
TXT _dmarc v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s
TXT *._domainkey v=DKIM1; p=

What each record does

Null MX: the domain accepts no mail

A null MX is a single MX record with priority 0 and . as the mail server [1]. It tells senders that the domain accepts no mail, so mail sent to it fails at once instead of sitting in a queue for days [1]. RFC 7505 also lets receivers refuse mail whose sender address uses a null MX domain, with reply code 550 and status 5.7.27 [1]. The same RFC says domains that send no mail can add an SPF -all record to declare it [1].

SPF -all: no server may send

v=spf1 -all contains one mechanism, and all matches every IP address [3]. With the - qualifier the result is fail for every server that tries to send as your domain [3]. That covers the envelope sender (MAIL FROM), and receivers are advised to check the HELO name of the sending server with SPF too [3]. The From address people see is left to DMARC. An SPF record also covers only the exact name it sits on, so www.example.com needs its own if it has DNS records [3]. The UK guidance shows the same v=spf1 -all record on a subdomain [7].

DMARC p=reject: receivers reject forged mail

DMARC is the record receivers act on for the From address people see [4]. With no server allowed by SPF and no valid DKIM key, no message can pass DMARC, and the DMARC policy p=reject asks receivers to reject every one of them [4].

  • sp=reject applies the same policy to subdomains that exist [4].
  • Subdomains that do not exist fall back to sp, then p, when the record has no np tag [4]. Here both say reject.
  • adkim=s and aspf=s ask for strict alignment: the authenticated domain must be identical to the From domain [4].

This record asks for no reports. To receive them, add a rua tag with a mailbox on another domain that receives mail, such as rua=mailto:dmarc@example.net. A mailbox on this domain cannot receive anything once the null MX is in place [1]. Receivers ignore a rua address on another domain unless that domain accepts the reports with a TXT record v=DMARC1 at example.com._report._dmarc.example.net [10]. A DMARC report service publishes that record on its own domain, and can use a wildcard that accepts reports for every domain [10].

Empty DKIM key: any signature fails

A DKIM key record with an empty p= means the key has been revoked, and a verifier must treat any signature that points to it as failed [5]. The * makes the record answer for every selector name that does not exist in your zone [6]. A receiver that checks a forged signature with any of those selectors finds a revoked key and fails it [5][6]. A selector with no record fails too, and RFC 6376 defines no difference between a revoked key and a removed one [5]. The wildcard states the revocation explicitly, as the UK guidance does [7].

What forged mail gets

When a receiver applies your p=reject, the sender sees a rejection. Gmail’s version [8]:

550 5.7.26 Unauthenticated email from domain-name is not accepted due to domain's DMARC policy. Contact the administrator of domain-name domain if this was legitimate email. …
Exact text from source [8]

DMARC protects the exact domain. It does not cover lookalike domains, such as a domain one letter off yours, or a familiar name in the display part of the From line [4].

Why having no MX record is not enough

With no MX record at all, senders fall back to the domain’s own address records. RFC 5321 calls this the implicit MX: “If an empty list of MXs is returned, the address is treated as if it was associated with an implicit MX RR, with a preference of 0, pointing to that host” [2]. Mail to anything@example.com then goes to your web server. The null MX ends that [1].

An MX record only says where mail to the domain goes [2]. SPF, DKIM and DMARC say who may send as the domain [3][4][5], and they stop spoofing.

Mistakes to avoid

  • Adding the null MX next to other MX records. A domain with a null MX MUST NOT publish any other MX record [1]. Remove the old ones first.
  • Publishing a null MX on a domain that sends mail. RFC 7505 says domains used in sender addresses SHOULD NOT publish one, because receivers may reject their mail [1]. Use this set only when nothing sends or receives mail as the domain.
  • Giving up when the panel refuses .. Some DNS providers do not support a null MX record [7]. Publish the other three: they still make forged mail fail DMARC.
  • Leaving old DKIM selectors in place. The wildcard answers only for names that do not exist [6]. An old key at s1._domainkey.example.com, or a CNAME there to a former provider, still works. The UK guidance says to revoke existing selectors in both TXT and CNAME records [7]. See removing old DKIM records.
  • Using ~all or p=none. ~all gives softfail, a weaker statement than fail [3], and p=none asks receivers to do nothing with mail that fails [4]. A domain that sends nothing has no mail to lose, so go straight to -all and p=reject. A domain that does send mail needs the gradual route in moving from p=none to p=reject.
  • Adding a second SPF record. If the domain already has a v=spf1 record, replace it with v=spf1 -all. Two SPF records make SPF return permerror [3]. See two SPF records on one domain.

If one subdomain does send mail, sp=reject applies to it too. Publish a DMARC record on that subdomain itself: receivers look for the record on the exact domain first [4]. More on forged mail and how DMARC stops it: how to stop email spoofing.

Check if your domain can be spoofed

The checker reads your domain’s MX, SPF, DKIM and DMARC records in your browser, tells you whether anyone can send email as you and gives the records that fix it.

Check if your domain can be spoofed

Runs in your browser. Your domain is not sent to this site or stored.

See it on a test domain

Check these names under badmail.dev to see this in a result, without checking your own domain.

All the test domains

Sources

  1. 1RFC 7505, A “Null MX” No Service Resource Record for Domains That Accept No Mail. Sections 3, 4.1, 4.2rfc-editor.org, IETF. Checked .
  2. 2RFC 5321, Simple Mail Transfer Protocol. Section 5.1rfc-editor.org, IETF. Checked .
  3. 3RFC 7208, Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1. Sections 2.3, 2.6.4, 2.6.5, 3, 4.5, 4.6.2, 5.1rfc-editor.org, IETF. Checked .
  4. 4RFC 9989, Domain-Based Message Authentication, Reporting, and Conformance (DMARC). Sections 2.2, 3.2.10, 3.2.13, 4.7, 4.10.1rfc-editor.org, IETF. Checked .
  5. 5RFC 6376, DomainKeys Identified Mail (DKIM) Signatures. Sections 3.1, 3.6.1 (p= tag) and 6.1.2rfc-editor.org, IETF. Checked .
  6. 6RFC 4592, The Role of Wildcards in the Domain Name System. Sections 2.2 and 2.2.1rfc-editor.org, IETF. Checked .
  7. 7Protect domains that do not send email (last updated 1 March 2021)gov.uk, Government Digital Service and Central Digital and Data Office. Checked .
  8. 8Gmail SMTP errors and codesknowledge.workspace.google.com, Google. Checked .
  9. 9Measurement: dig 9.10.6 against 1.1.1.1, MX and TXT on example.com, example.net and example.org, TXT on _dmarc and on a random name under _domainkey for each, n = 3 domains, 18 November 2026 at 11:58 CETrfc-editor.org, Measurement. Checked .
  10. 10RFC 9990, Domain-Based Message Authentication, Reporting, and Conformance (DMARC) Aggregate Reporting. Section 4rfc-editor.org, IETF. Checked .