Remove "via" and "on behalf of" from your mail
Updated 2026-11-16
Two labels make recipients wonder whether a message is really from you. Gmail shows "via" and a website name next to the sender's name. Outlook shows "on behalf of" between two addresses. Both mean that the message names one domain in its From address and was sent or authenticated by another. You can remove them for mail you send through a service, by giving the service a domain of yours to authenticate with.
The background is in SPF explained, DKIM explained and DMARC explained. The records for each service are in the provider guides, for example Amazon SES, Mailchimp and Zendesk.
Two From addresses
Every message has two sender addresses. Amazon's SES documentation explains it well: "it has two addresses that indicate its source: a From address that's displayed to the message recipient, and a MAIL FROM address that indicates where the message originated. The MAIL FROM address is sometimes called the envelope sender, envelope from, bounce address, or Return Path address."
SPF checks the MAIL FROM domain. DKIM checks the domain in the signature's d= tag. Neither looks at the From address you see; DMARC is what ties one of them to it. A service that sends for you by default uses its own domain for both, so SPF and DKIM pass, but for the service's domain, not yours.
When Gmail shows "via"
Gmail's help page gives the reasons. "via" appears if:
- "The domain it was sent from doesn't match the domain in the "From:" address."
- "The email was sent to a Google Group from a domain that has a "p=reject or p=quarantine" DMARC policy."
The second case is a mailing list rewriting the sender, which you cannot change as the sender; Email forwarding and DMARC explains why lists do it. The first case you can fix. Gmail's own steps for mail "not sent through Gmail" are:
- "Publish an SPF record that includes the IPs of the vendor or affiliates which send your messages."
- "Sign your messages with a DKIM signature that is associated with your domain."
- "Make sure the domain in the "From:" address matches the domain you're using to authenticate your emails."
The third step is the one that removes "via". In practice it means DKIM signed with d= your domain, or a MAIL FROM domain under your domain.
When Outlook shows "on behalf of"
Outlook shows "on behalf of" when one address sends for another. Gmail's help page for "Send mail as" gives an example of what Outlook users may see: "From [email protected] on behalf of [email protected]."
When it appears for your own domain's mail, Microsoft's troubleshooting page for email authentication lists "Send on behalf of in Outlook" as a common scenario, with "From: [email protected] on behalf of [email protected]" as what the user sees, and gives the root cause as "SPF softfail or fail because the sending IP isn't authorized in the SPF record". Its fix is to add the sending IP address or the service's include to the SPF record; see Adding another sender.
The fix at a sending service
Most services offer two settings, often called domain authentication or sender authentication. Use both:
- DKIM with your domain. The service gives you a CNAME or TXT record under
_domainkeyon your domain and then signs withd=your domain. This alone gives DMARC an aligned pass and removes "via" in Gmail. - A MAIL FROM (Return-Path) domain of yours. The service gives you a subdomain, for example bounce.example.com, with an MX record for bounces and an SPF record for the service. SES describes it like this: "If you don't want to use the SES default MAIL FROM domain, and would rather use a subdomain of a domain that you own, this is referred to in SES as using a custom MAIL FROM domain." SES adds that the subdomain "shouldn't be a subdomain that you also use to send email from" and "shouldn't be a subdomain that you use to receive email."
With a MAIL FROM subdomain, SPF passes for bounce.example.com, which DMARC accepts for From addresses at example.com under its default relaxed alignment (aspf defaults to r in RFC 9989). The SPF record for the service goes at the subdomain, not in the record of example.com.
Do not try to remove "via" by adding the service's include to the SPF record of your main domain alone. SPF is checked for the MAIL FROM domain, and as long as that is the service's own domain, the record of your main domain is not consulted.
How to check it
Send a test message to a Gmail address and open "Show original". The Authentication-Results header shows dkim=pass with header.d= and spf=pass with smtp.mailfrom=; both domains should be yours or subdomains of yours. Reading Authentication-Results explains the fields. Then run the email security check on your domain, and use the DKIM selector finder to see the selector the service publishes.
Frequently asked questions
Why does Gmail show "via" next to my name?
Gmail shows it when "The domain it was sent from doesn't match the domain in the "From:" address", typically when a newsletter or ticket service sends with your From address but signs and sends with its own domain. Sign with DKIM under your own domain at that service and the "via" goes away.
Is "on behalf of" a sign of spoofing?
Not necessarily. Outlook shows it when one address sends for another, for example with Gmail's "Send mail as" or a service that sends for you. Microsoft's own troubleshooting page traces many cases to SPF failing because the sending IP address is not in your SPF record.
Do I need a custom MAIL FROM domain if DKIM already passes?
Not for DMARC: an aligned DKIM pass is enough. A MAIL FROM domain of your own adds an aligned SPF pass as a second path, which helps when a signature breaks, and makes bounces come back to a domain you control.
Sources
- Extra info next to sender's name, Gmail Help, fetched 2026-11-16.
- Send emails from a different address or alias, Gmail Help, fetched 2026-11-16.
- Troubleshoot email authentication in Microsoft 365, Microsoft Learn, fetched 2026-11-16.
- Using a custom MAIL FROM domain, Amazon SES Developer Guide, fetched 2026-11-16.
- RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance (DMARC), alignment, RFC Editor, fetched 2026-11-16.