
Here's the uncomfortable truth: your website is probably telling you an email was "sent" when all it really did was hand the message to something else and walk away.
This guide shows you how to find out what that "something else" is, why it matters more than any DNS record, and how to authenticate website email so it actually lands. You'll also learn the one setting that quietly turns your own contact form into a forgery machine (and most site owners have it switched on).
Why "Sent Successfully" on Your Website Means Almost Nothing
When a visitor clicks submit and sees a green tick, it feels like the job's done. It isn't.
That tick usually means one thing: the website passed the message to the next system in line. That might be:
- The web server's own built-in mail function
- A relay run by your hosting company
- A mailbox account (like an Office 365 or Gmail login) the site uses to send
- An email API service such as a transactional sending platform
- A queue that will try to send it later
Think of it like posting a letter through the slot of a sorting office. You know it left your hand. You don't know if it got stamped, sorted or delivered.
So when someone says "the website email is broken", the first honest question is: broken where? At creation? At hand-off? At the receiving mailbox?
Until you can answer that, every DNS change you make is a guess.
Your Contact Form Is a Tiny Mail System With Five Moving Parts
Most people picture a contact form as one thing. It's actually a chain. For every message type your site sends, write down these five parts:
- What creates the message (the form plugin, the shop, the booking system)
- What submits it (a mail library, an SMTP plugin, an API call)
- What accepts it (a hosting relay, a mailbox server, a provider endpoint)
- Which account it uses to send
- Who retries it if the first attempt fails
Do this separately for each message type. A shop might send receipts through one service and password resets through another. A booking system might have its own reminders running on a schedule you've forgotten about.
One more thing. Don't paste any passwords into this map. Just note where the credential lives (a password manager entry, a hosting panel) and who owns it.
The Setting That Makes Your Form Forge Your Visitor's Identity
This one catches out a huge number of small business websites.
Many contact forms are set up so the email you receive appears to come from the visitor. If Sarah at sarah@herbusiness.co.uk fills in your form, the notification lands in your inbox "From: sarah@herbusiness.co.uk".
It looks convenient. You just hit reply.
But think about what's actually happening. Your web server is sending an email claiming to be from herbusiness.co.uk. Your server has no permission to do that. As far as Gmail or Outlook is concerned, your website just tried to impersonate someone else's domain.
If Sarah's company has a strict DMARC policy, that message can be rejected outright. Even if it isn't, it's a red flag to every spam filter it touches.
The fix is simple, and it's how the professionals do it:
- Put your own domain in the From address (for example, forms@yourbusiness.co.uk)
- Put the visitor's address in the Reply-To field instead
- Validate and clean that address before it goes into the header
Now when you hit reply, it still goes to Sarah. But your website is no longer pretending to be her.
Why Adding Your Web Server's IP to SPF Often Fixes Nothing
Here's the classic move. Someone notices website emails failing, finds the web server's IP address, and adds it to the SPF record on the main domain.
Sometimes it works. Often it changes nothing at all. Occasionally it makes things worse.
The reason is how SPF actually works. SPF doesn't check the From address your customer sees. It checks a hidden address used behind the scenes, called the envelope sender or MAIL FROM (you'll often see it as Return-Path in the message headers). SPF asks: "Is the server that connected allowed to use this domain?" RFC 7208 defines exactly which identities SPF checks.
So if your website sends through an email service that uses its own envelope domain (something like bounces.emailservice.com), your root domain's SPF record isn't even consulted. You could add every IP on earth to it and the result wouldn't budge.
Worse, if your site lives on shared hosting, that IP might be shared with hundreds of other websites. Adding it to SPF means authorising all of them to send as you.
What to do instead:
- Send one test message through the real form
- Look at the received message's Return-Path (or the receiver's SPF result)
- Note which domain was actually checked
- Only then decide where an SPF change belongs
If your sending service offers a "custom return-path" or "custom bounce domain" on a subdomain of yours, that's usually the cleaner route. Set it up using the service's own account instructions, then check the DNS answer is public.
And remember: your domain can only have one SPF record at each name. Adding a provider's include to an existing record means merging carefully, not adding a second record.
If another system changes the route after your website hands the message over, forwarding and mailing-list authentication failures shows what to compare at both points.
DKIM Only Works If Something Actually Signs the Email
DKIM is the email equivalent of a wax seal. The sending system signs the message with a private key, and the receiver checks the signature using a public key published in your DNS. RFC 6376 describes this.
Here's the mistake people make: they publish the public key in DNS and assume the job is done.
Publishing a key doesn't make anything sign. It's like printing your signature on a card and leaving it in a drawer. Something still has to pick up the pen.
So ask: what is the signer for this route?
- Is it the website itself (rare)?
- The SMTP relay?
- The email API service?
Once you know, turn on DKIM signing in that system, using its current account instructions. It will give you a selector name and either a public key or a CNAME record to publish. Keep the private key where it belongs, inside the sending service.
Then send a test and check the received message. You're looking for:
- DKIM result: pass
- The signing domain (the d= value in the DKIM-Signature header)
If it fails, look up the exact selector it used. A missing DNS record is one problem. A gateway that changes the message after it was signed is a completely different one.
The Quiet Check That Decides Whether Website Email Is Trusted: DMARC Alignment
This is where it all comes together, and it's the bit most guides skip.
DMARC doesn't care whether SPF or DKIM passed for any domain. It cares whether one of them passed for a domain that matches the From address your customer sees. That matching is called alignment. RFC 9989 defines it.
So imagine your receipts show "orders@yourshop.co.uk" but the email service signs them as "emailservice.com". DKIM passes. Everyone's happy. Except DMARC, because emailservice.com isn't yourshop.co.uk.
For most website and application email, the cleanest route is aligned DKIM: you set up the service to sign with your own domain (or a subdomain of it). The provider still does all the delivery work. It just signs with your name.
A custom return-path on your subdomain can give you aligned SPF as a second route. Having both is nice resilience, but you only need one aligned pass.
Google recommends authenticating the domain that hosts a public website and requires authentication for mail sent to personal Gmail accounts. Its sender guidance sets this out. But a record sitting on your root domain proves nothing about whether your app used it. Only a received test does.
See also what DMARC checks, and tracing a Gmail 550 5.7.26 rejection if a receiver names a specific failure.
How to Test Website Email So You Actually Learn Something
Sending "test test test" from the form once and seeing it arrive isn't a test. It's a hope.
Here's a test that tells you something real.
- Create a unique, harmless reference. Submit the real form with something like "TEST-REF-4471" in the message. No real customer details.
- Follow it through your logs. Note the time (in UTC) the application created it, handed it off, and what the sending provider says happened next.
- Open the received message's original source. Compare From, Reply-To, Return-Path, DKIM signing domain and the SPF, DKIM and DMARC results.
- Test the failure path. Where your provider allows it, send to a safe, deliberately invalid test address. Does the bounce go somewhere a human will see it? Does the address get suppressed, or does the system keep retrying forever?
- Check for duplicates. If the first attempt is still queued, does your app fire off a second copy?
- Repeat for another message type. Password resets and receipts may share settings you didn't realise.
That fourth step is the one almost nobody does. And it matters, because a contact form with no working bounce path will happily send enquiry replies into the void for months without anyone noticing.
Keep Customer Data Out of Your Troubleshooting
When something's broken, it's tempting to grab a real customer's failed order and forward it to everyone who might help. Don't.
Build your investigation around your fake test reference and timestamps instead. Keep:
- The route map
- Queue or event IDs
- Provider responses
- DNS answers
- A redacted copy of the received header
Strip out names, addresses, order details and especially password reset links. The person checking DNS needs domains and verdicts. The developer needs event and queue states. Nobody needs Sarah's home address.
Application logs deserve extra care. They can contain full form submissions, tokens and error traces. Share only the specific lines showing creation, hand-off, retry and provider response.
And SMTP passwords, API keys and private signing keys never get copied into tickets. Ever. Note who owns them and where they're stored. That's all anyone needs.
If you genuinely can't reproduce the problem with a test and the only option is a real customer record, stop. Ask the person responsible for that data to approve a controlled look.
Trace One Event From Click to Inbox (The Proof That Ends the Argument)
This is the step that settles disagreements between "the website people" and "the email people".
Pick one real action and follow it the whole way:
- Submit the form, create a test order or request a password reset, using a unique reference
- Watch it appear in application logs
- See it queued, then accepted by the relay or API
- See the provider's response from the receiving server
- Open it in a mailbox you control and read the authentication results
Compare every timestamp to your route map. When the business event, the transport logs and the received message all agree, you've got proof.
A DNS checker can't give you this. It can't tell you whether your application picked the right account or signed with the right domain. Only a traced event can.
Save the redacted trace, the DNS answers and the header together under the test reference. Next time something breaks, you'll have a baseline to compare against.
And if the message authenticates perfectly but then vanishes into an internal support queue? That's a separate problem. Record it separately. Don't call the whole journey a success.
Know When to Stop Changing Things
There's a point where more tinkering makes things worse. Stop and regroup if:
- You can't identify which service actually sends the mail
- Logs disagree about whether a message left the queue
- Someone proposes an SPF change that would authorise a whole hosting range
- The DKIM selector you're about to overwrite belongs to another application
- Retries are creating duplicate emails
- A production transaction starts failing after your change
At that point, hand each team the evidence they need. The application owner gets the event trace. The hosting team gets the hand-off evidence. The email provider gets its message ID and a redacted header. Whoever runs DNS gets only the exact domain names observed and the saved baseline.
What you shouldn't do is rotate to a new domain, weaken your DMARC policy or start sharing passwords to get around the problem. Those feel like progress. They're really just ways of hiding the evidence.
Resume once each piece of the chain has an owner, a test message shows your own domain authenticating properly, and the duplicate risk is gone.
The Short Version for Busy Site Owners
If you remember nothing else:
- "Sent" on your website means "handed off", nothing more
- Never put the visitor's email in the From field; use Reply-To
- SPF checks the hidden envelope domain, so find out which one is used before editing records
- Publishing a DKIM key doesn't make anything sign; turn signing on in the sending service
- DMARC needs one pass that matches your visible From domain
- Test with a fake reference, and test the failure path too
Do those six things and most "website emails going to spam" problems stop being mysterious.
Frequently Asked Questions
Why do my WordPress contact form emails go to spam?
Usually because the site sends using the web server's built-in mail function, with no proper authentication for your domain, or because the form puts the visitor's address in the From field. Routing the form through an authenticated SMTP or API service that signs with your domain fixes most cases.
Should my contact form send from noreply@ my domain?
Use an address on your own domain, yes. But consider making it a monitored address rather than noreply, because bounces and replies have to go somewhere a human will see them.
Do I need a separate subdomain for website email?
Not always. A subdomain can help separate reputation and ownership when website email is high volume or run by a different team. For a simple contact form, your main domain with proper authentication is usually fine.
My order confirmations pass SPF and DKIM. Why are they still in spam?
Check alignment first: do they pass for your domain, or the platform's? If they do align, look at content, sending patterns and whether marketing mail from the same domain is hurting its reputation.
Sources and further reading
- Google email sender guidelines
- RFC 7208: Sender Policy Framework
- RFC 6376: DomainKeys Identified Mail signatures
- RFC 9989: Domain-based message authentication, reporting and conformance