Steve Putala

Web application developer

Prevent scammers emailing from your parked domains

Add these DNS records to stop email scammers from sending emails using your parked domain names, which can get your domain blocklisted.

SPF

No server is allowed to send email as example.com.

Type: TXT
Host: @
Value: v=spf1 -all

DKIM

An empty key, p=, means no DKIM signature from your domain will ever be valid. RFC 6376 treats an empty key as revoked, so the receiver treats any signature using it as a hard failure.

Type: TXT
Host: *._domainkey
Value: v=DKIM1; p=

DKIM is not required, because SPF and DMARC already trigger a spoofed mail rejection. However, an explicitly revoked key is a definite failure and cannot be mistaken for a temporary DNS problem.

Some DNS providers won't accept a wildcard host that contains an underscore label, so this record may not work in your DNS dashboard and is fine to skip.

DMARC

Get Outlook, Gmail, etc. to reject mail that fails SPF or DKIM, which is any email claiming to be from example.com.

Type: TXT
Host: _dmarc
Value: v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;

DMARC with reporting on spoof attempts

Use the following two records instead of the one above if you want to get a report of attempts to spoof your email. You must use an email address on a different domain name since we are blocking sending from example.com.

Type: TXT
Host: _dmarc
Value: v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s; rua=mailto:you@example.net;

Add this record to the DNS for example.net, the domain of the report address. It tells receivers that example.net agrees to get DMARC reports for example.com.

Type: TXT
Host: example.com._report._dmarc
Value: v=DMARC1

MX

This is a "Null MX" (RFC 7505) that tells mail servers example.com doesn't receive email. Messages sent to it bounce right away and some receivers treat it as a sign that the domain doesn't send email either.

Type: MX
Host: @
Priority: 0
Value: .

Some DNS providers won't accept . as the value. If yours doesn't, you can either remove the MX record or try using invalid. for the value. Per RFC 6761, invalid is a reserved top-level domain that will not resolve.

Test the DNS values

After the DNS records propagate, run these commands to check that everything is set up correctly.

dig +short TXT example.com
dig +short TXT _dmarc.example.com
dig +short MX example.com
dig +short TXT test._domainkey.example.com

Expected output, in the same order:

"v=spf1 -all"
"v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;"
0 .
"v=DKIM1; p="

The first command lists every TXT record on example.com, so you may also see others, such as domain verification records.

If you added a report address also check the report authorization record:

dig +short TXT example.com._report._dmarc.example.net

Expected output:

"v=DMARC1"