Websites & landing pages11 min readReviewed by the Softivum team,

Why do my website contact form emails go to spam, and how do I fix it?

Short answer

Contact form emails go to spam when your website sends mail that claims to be from your domain but cannot prove it. The fix is to send through a real mailbox or mail service, add SPF and DKIM records to your domain, add a DMARC record, use your own address in From with the visitor in Reply-To, and test the headers in Gmail.

An office worker's hands at a desk scanning a laptop screen of an overfull inbox, with a handwritten sticky note of three checkmarks beside the keyboard.

The key points

  • A form email is a message your website sends in your name, so mailbox providers check whether the sender is allowed to use your domain.
  • Google's sender guidelines ask every sender to set up SPF or DKIM, and bulk senders to set up all three, SPF, DKIM and DMARC.
  • The most common cause is a From address that is the visitor's email or a domain the site is not authorised to send for.
  • Gmail's Show original view tells you in a minute whether SPF, DKIM and DMARC passed.
  • Fix the sending path first and the DNS records second, then send a real test to Gmail and to a business mailbox.

Why does a contact form email end up in spam?

A contact form does not send mail the way you do from Outlook or Gmail. Your website builds an email and hands it to a mail server, and that email says it is from some address. The receiving provider then asks one question: is this server allowed to send mail for that address? If the answer is not clearly yes, the message goes to spam or is rejected.

Google puts the rule in writing. Its email sender guidelines say that all senders must set up SPF or DKIM, and that sending to personal Gmail accounts requires a DKIM key of 1024 bits or longer. Senders must also use TLS and must not impersonate Gmail From headers. A contact form is small-volume mail, but it is judged by the same authentication checks.

Three terms come up in every fix. SPF is a DNS record that lists the servers allowed to send for your domain. DKIM adds a digital signature to each message so the receiver can check it was not altered and really came from your domain. DMARC is a DNS record that tells receivers what to do when SPF and DKIM do not line up with the From address, and where to send reports.

What are the usual causes on a business website?

Four causes cover most cases we see, and they often stack.

First, the visitor's email is used as the From address. The form wants replies to go to the visitor, so it sends the notification as the visitor. Your server is then claiming to be Gmail, Yahoo or a company it has no right to speak for. Google's guidelines say senders must not impersonate Gmail From headers, and the same logic applies to any domain.

Second, the site sends through a default route with no signature. Many hosting plans let a website send mail directly from the web server. That mail usually carries no DKIM signature for your domain, and the server's address is often missing from your SPF record.

Third, the DNS records are missing, duplicated or incomplete. A domain can have SPF for its office mailboxes while the website or a third-party tool such as a form service or a CRM sends mail that the record does not list.

Fourth, the message itself looks wrong: no subject, a link-only body, or an HTML template that is one large image. Content rarely causes the first failure, but it can tip a borderline message into spam.

How do you find out which check is failing?

Start with a real test, because the headers show the answer. Submit your own form. In Gmail, open the message, choose More next to Reply, then Show original. Google's Gmail help page describes this view, and it lets you copy the full header and paste it into Google's Messageheader analysis tool.

Google's DKIM guide says to look in the recipient's message headers for DKIM=pass or DKIM=OK in the Authentication-Results line, and that no DKIM line means the messages are not being signed. Google's sender guidelines FAQ shows the same style of result in rejection messages, for example a line saying that SPF or DKIM did not pass. Write down which check fails, and what the From address and the Return-Path domain are, because those decide where to fix it.

Send one test to a Gmail account and one to your own business mailbox. If it lands in the inbox at one and in spam at the other, compare the two Authentication-Results lines: the stricter provider shows which check is failing. If both pass, the difference is that mailbox's own filter rules, covered below.

How do you fix the From address and Reply-To?

Change the form so that every notification is sent from an address on your own domain, for example website@yourcompany.com, a real mailbox or an address your mail service owns. Put the visitor's email in the Reply-To header. Validate it as a single email address and strip line breaks first, so nobody can inject extra headers or recipients through the form. When you press Reply, the answer goes to the visitor, and the message still comes from a sender your domain vouches for.

Use the same From address every time, so the sender builds a consistent record. Keep a plain, human subject such as New enquiry from the website, with the visitor's name in the body. Do not put the visitor's text in the subject line: a stranger controls it, so spam phrases or injected headers land on your sender's record.

This change is half of the fix. DMARC compares the From domain with the domain that passed SPF or DKIM, so the From address has to be on your domain and the route that sends it (next section) has to authenticate for that domain. Google's FAQ sets alignment with either the SPF or the DKIM organisational domain as a requirement for bulk senders, and recommends aligning with both.

How do you send form emails the right way?

Pick one authorised sending route and make the website use it. There are three sensible choices.

The first is your own Google Workspace or Microsoft 365 mailbox, used through the provider's SMTP settings, with the sign-in method that provider requires. It suits low volume and keeps one set of records. The second is a transactional email service built for website mail, where you add the domain records the service gives you. The third is your form tool's own mail feature, if it lets you authenticate your domain. For a CRM or lead capture setup, the form should store the enquiry first and send the email second, so a delivery problem never loses a lead.

Whichever route you choose, the rule is the same: the service that sends the message must be listed in SPF or must sign with a DKIM key for your domain. Ask the provider for its exact DNS records instead of guessing them.

How do you set up SPF for the domain?

Google's SPF setup guide says to add a TXT record at your domain host, with the host set to @ for the main domain. If Google is your only sender, the record is v=spf1 include:_spf.google.com ~all. Other senders add their own include entries, and the guide gives examples for Amazon, Microsoft 365, Mailchimp and Zendesk. It also says each domain needs its own SPF record. An SPF check may make at most 10 DNS lookups in total, and includes inside a sender's own record count toward that limit (RFC 7208, section 4.6.4), so check the record with an SPF lookup tool after adding a sender.

Keep to one SPF record per domain. If you already have an SPF record, edit it and add the new sender to it instead of creating a second line. Allow time for DNS to update: the guide says up to 48 hours before you confirm that outgoing messages pass SPF.

How do you set up DKIM?

For Google Workspace, Google's DKIM guide gives the path: a super administrator opens Apps, Google Workspace, Gmail, Authenticate email, picks the domain and generates a new record. It suggests a 2048-bit key if your domain provider supports it and otherwise 1024-bit. Google then shows a TXT record name and value. You publish that record at your domain host, wait for it to take effect (up to 48 hours), and return to the console to click Start authentication.

To confirm it works, send a message to a Gmail or Workspace address that is not your own and look for a DKIM pass in the message header. The guide notes that sending to yourself does not confirm DKIM.

If your website sends through another service, that service has its own DKIM keys. Publish those records too. A domain can carry more than one DKIM key, each with its own selector name.

How do you add a DMARC record without blocking your own mail?

Google's DMARC guide says to turn on SPF or DKIM first and wait at least 48 hours before enabling DMARC. Then create a mailbox for reports and make sure every service that sends in your name passes SPF and DKIM. Publish a TXT record at _dmarc.yourdomain.com such as v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com, with the rua address pointing at the reports mailbox.

Start with the policy set to none. Google calls it the recommended starting point: it takes no action and sends you reports. After you have read the reports and know every legitimate sender passes, you can move to quarantine, which sends failing mail to spam, and later to reject. Moving too fast is how a business ends up blocking its own invoices.

What if the records are right and mail still goes to spam?

Work down a short list. Check the headers again for a fresh failure. Confirm the sending service's DNS records were saved at the host that actually controls your domain, because a domain registered in one place and pointed to DNS elsewhere is a common trap. Look for a second SPF record. Check whether the website's own security plugin or firewall is changing the message.

If the form notification passes all three checks and still lands in spam in one mailbox, the recipient's rules are the cause. Add the website address to the contacts list or create a filter that never sends it to spam, and tell anyone who reads the inbox. That is a local fix, and the DNS work above is what protects everyone else you email.

Reply testing matters too. After you reply to a new enquiry, check that the customer received it. A domain whose own replies go to spam loses the very leads the form collected. Server-confirmed tracking such as GA4 enquiry events shows how many forms were submitted, and comparing that count with the emails you received tells you whether any went missing.

How do you stop this coming back?

Mail breaks when something changes: a new website host, a new CRM, a switched mail provider, a developer who rebuilds the form. Each one can drop a sending service out of SPF or replace the From address. Keep a short list of everything that sends mail as your domain, and re-run the header test whenever one of them changes.

Ask for the test as part of any site change. A website maintenance routine should include sending a test submission and reading the headers, the same way it checks that forms and other features keep working over time. At Softivum we build the form, the sending route and the DNS records together as part of website development. The domain and mail accounts stay in your name, and the first header test runs before launch.

If follow-up matters as much as delivery, an automated lead follow-up flow stores every enquiry and nudges you when nobody has replied, so one missed email is never the only record of a lead. A UK business that stores those enquiries also checks whether it owes the ICO fee: do I need to pay the ICO data protection fee. An Australian business checks the Spam Act sender and unsubscribe rules for the same mail: Privacy Act and Spam Act for a business website.

The three email checks and the header setting that decides them

The three email checks and the header setting that decides them
CheckWhat it provesWhere it livesCommon form mistake
SPFThe sending server is allowed to send for your domainTXT record at the domain rootThe website's mail service is not listed, or there are two SPF records
DKIMThe message is signed by your domain and was not alteredTXT record under a selector nameThe signing key was never published or turned on
DMARCWhat to do when SPF or DKIM do not match the From domainTXT record at _dmarcNot set up, or set to reject before every sender passes
From and Reply-ToWho the message is from and where replies goForm or mail service settingsThe visitor's address is used in From

Contact form email fix checklist

  • A test submission has been read in Gmail with Show original, and the failing check is noted
  • The form sends from an address on your own domain
  • The visitor's email is in Reply-To, not From
  • The website sends through one authorised route: a mailbox, a mail service or the form tool's authenticated sender
  • The domain has one SPF record that lists every service that sends for it
  • DKIM is published and switched on for the domain and for any extra sending service
  • A DMARC record exists, starting at none, with a mailbox that reads the reports
  • A test to Gmail and to your business mailbox lands in the inbox
  • The form stores each enquiry as well as emailing it
  • The header test is repeated after any change to hosting, CRM or mail provider

Sources

Rules and guidance this answer relies on. Policies change, so check the current version before acting on it.

  1. Google Workspace Admin Help: Email sender guidelines
  2. Google Workspace Admin Help: Email sender guidelines FAQ
  3. Google Workspace Admin Help: Set up SPF
  4. Google Workspace Admin Help: Set up DKIM
  5. Google Workspace Admin Help: Set up DMARC
  6. Gmail Help: Trace an email with its full headers
  7. IETF: RFC 7208, Sender Policy Framework

Questions people also ask

Gmail checks authentication strictly. Google asks every sender to set up SPF or DKIM, and its filter is hard on mail that claims your domain without proving it. Other providers may be more lenient, so the Gmail result is the one to fix against. Open the message, choose Show original, and look at the SPF, DKIM and DMARC results.

No. Your website would be sending as a domain it has no right to use, which fails authentication checks. Send from an address on your own domain and put the visitor's email in Reply-To, so replying still reaches them.

Google requires DMARC only from bulk senders, but it is good practice for any domain that sends email. Start with the policy set to none, read the reports, and tighten the policy only after every legitimate sender passes.

Want this applied to your business?

Tell us what you are planning in a free 30-minute call, or have your current website checked first with no call needed.

Get a Free 2-Minute Website Audit

Free 30 minutes · no obligation

WhatsAppCall