E-commerce and rules 4 min read Updated
Getting order emails delivered to the inbox
In short
Order emails reach the inbox when receivers can check that your domain authorised the sender, which SPF, DKIM and DMARC records make possible.
An order confirmation that lands in the spam folder is one the customer never sees. Receiving mail servers decide partly whether to trust a message by checking that the sending server is allowed to send for the domain. Three DNS-based standards make those checks possible: SPF, DKIM and DMARC. Set up all three, in the order described below.
Three records, three jobs
SPF, DKIM and DMARC are separate mechanisms that work together. Each answers a different question.
| Standard | Question it answers | Where it lives |
|---|---|---|
| SPF | Is this server allowed to send mail for the domain? | A DNS record listing the authorised senders |
| DKIM | Was the message changed after the domain signed it? | A signature in the message, checked with a public key in DNS |
| DMARC | What should the receiver do when these checks fail? | A DNS policy record for the domain |
SPF: keep the record short
A receiving server runs SPF checks on each message it receives. RFC 7208 says implementations must limit the total number of terms that trigger DNS lookups to 10, and if the limit is exceeded the result is a permanent error. Every included sending service adds lookups, so a record that grows with each new tool can break without warning. The final mechanism of the record sets the default. A tilde-all ending is a softfail: the server is probably not authorised, but the result is weaker than a fail.
DKIM: a signature for the message
DKIM attaches a cryptographic signature tied to your domain. The signature associates the signing domain with a hash of the message, and verifying it asserts that the hashed content has not changed since it was signed. Public keys are published in a subdomain named _domainkey, under a selector that identifies the key. Most mail providers create the key pair for you, and you then publish the public key in DNS.
Working on something similar in your own product? A few honest sentences are enough – we read every enquiry and reply by email. Apply with your idea
DMARC: tell receivers what to do
DMARC lets the domain owner publish rules for messages that claim the domain but fail authentication. The policy values are none, which asks for no specific action, quarantine, which asks receivers to treat failing mail as suspicious, and reject, which asks them to refuse it. Alignment, in relaxed or strict mode, was defined in RFC 7489. RFC 9989 now obsoletes RFC 7489 and RFC 9091, so read RFC 9989 for the current text.
What Google expects from bulk senders
Google’s email sender guidelines cover senders above a volume threshold. The page states that threshold in two slightly different ways, so check the current wording before relying on a number. For those senders the guidelines require SPF, DKIM and DMARC, and they set a spam rate below 0.30% in Postmaster Tools. They advise keeping the rate below 0.10% and never reaching 0.30% or more. Google dates these requirements from 1 February 2024. A DMARC policy may start at none.
Checklist for a safe setup
- List every service that sends mail for your domain, such as the shop, the newsletter tool and the helpdesk.
- Publish one SPF record that covers them, and count the lookups against the 10-term limit.
- Turn on DKIM signing in each service and publish its public key.
- Publish a DMARC record with the policy set to none, and read the reports for a while before you tighten it.
- Send a real order confirmation to a few inboxes and check the authentication results in the message headers.
Deliverability is part of the wider order flow. For the steps before the email, see A checkout that keeps shoppers to the end. To record what a failed send looked like, see What to record in logs and how long to keep them.
Common questions
- Do I need SPF, DKIM and DMARC all three?
- Google’s sender guidelines list SPF, DKIM and DMARC together for bulk senders. Each does a different job: SPF checks the sending server, DKIM checks the signature, and DMARC tells receivers what to do when checks fail.
- What does a DMARC policy of none mean?
- The none policy asks receivers to take no specific action on delivery. Google notes that the DMARC enforcement policy can be set to none, so you can start by reading reports and tighten the policy later.
- How many DNS lookups can SPF use?
- RFC 7208 says implementations must limit the total number of those terms to 10, and if the limit is exceeded the result is a permanent error. Count the include entries in your record before you add another sending service.
Sources
- Email sender guidelines, Google (Gmail Help). Accessed 24 November 2026
- RFC 7208: Sender Policy Framework (SPF), IETF (RFC Editor). Accessed 24 November 2026
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures, IETF (RFC Editor). Accessed 24 November 2026
- RFC 9989: Domain-based Message Authentication, Reporting, and Conformance (DMARC), IETF (RFC Editor). Accessed 24 November 2026
Further reading
-
Automating an online shop without losing control
Automate what follows from a recorded fact, keep refunds and exceptions with people, and switch each flow on in steps with a record of what it did.
-
Delivery deadlines and the passing of risk
Unless you agree otherwise, the trader must deliver within 30 days of the contract, and a late delivery lets the consumer end the contract after an extra period.
-
What to record in logs and how long to keep them
Log the security events that help you answer what happened, keep passwords, tokens and personal data out of logs, and protect the logs you keep.
Have an idea that should exist? Or a working product that needs more customers, a new website or a complete rework? Bring us anything. Apply with your idea