Why Your Website's Emails Land in Spam, and the 3 DNS Records That Fix It
Your contact form alerts, password resets, and order receipts land in spam because the receiving mail server can't prove your domain actually sent them. The fix is not a better subject line. Send through a proper email service using your own domain, and publish three DNS records (SPF, DKIM, and DMARC) that let Gmail and Outlook verify every message is really from you.
Why website emails get flagged
Most deliverability problems on small sites come from a handful of setup mistakes, not from the content of the email:
- The form "sends as" the visitor. Many contact forms put the visitor's address in the From field. Your server is not allowed to send for gmail.com or anyone else's domain, so the message fails every check.
- Mail goes out from the web server itself. Cheap or shared hosting sends from IP addresses with no reputation, or a bad one shared with other sites.
- Nothing is authenticated. No SPF, no DKIM, no DMARC. Gmail and Yahoo now require authentication from senders, so unauthenticated mail is treated with suspicion by default.
- Two tools, one broken record. You added a newsletter tool or a CRM later, and its sending permission was never added to your DNS.
The three records, in plain English
SPF is a TXT record on your domain that lists which services may send mail for it, for example your workspace email and your transactional email provider. Two rules trip people up: a domain can have only one SPF record (combine services into it rather than adding a second), and SPF allows at most ten DNS lookups, so long chains of "include" entries can quietly break it.
DKIM is a digital signature. Each sending service gives you a public key to publish in DNS, usually under a name like selector._domainkey. The service signs every message, and receivers check the signature against your key. Set up DKIM separately for every service that sends as your domain.
DMARC ties the two together and tells receivers what to do when a message fails. It lives at _dmarc.yourdomain.com. Start with p=none and a reporting address so you can see who is sending as you without blocking anything. Once the reports show only legitimate senders passing, move to p=quarantine, then p=reject. That final step also stops strangers spoofing your domain in phishing emails.
How to set up site email properly
- Send app and form emails through a transactional email service such as Postmark, Resend, Amazon SES, or SendGrid, not straight from the web server.
- Use a From address on your own domain, like
hello@ornotifications@. For contact forms, put the visitor's address in Reply-To so hitting reply still reaches them. - Keep marketing email apart from transactional email, ideally on a subdomain such as
news.yourdomain.com, so a newsletter complaint can't drag down your password resets. - Make sure the DNS and email service accounts are in your name, so you can fix a record without waiting on whoever built the site.
A five-minute check you can run today
Submit your own contact form, or trigger a password reset, to a Gmail address. Open the message, choose "Show original" from the three-dot menu, and look at the top. You want to see PASS next to SPF, DKIM, and DMARC. Anything that says FAIL, or is missing, tells you exactly which record to fix. Repeat the test after any change to your email or hosting setup.
Want emails that actually reach the inbox?
We build websites and apps with sending, DNS, and authentication set up correctly from day one, at a fixed public price, shipped in 1 to 10 days, with every account handed over to you.
Book a 30-min call →