How to remove the 'via' message in Gmail when sending from a subdomain?

Summary

To remove the 'via' message in Gmail when sending from a subdomain, it is critical to ensure proper email authentication. This includes configuring SPF, DKIM, and DMARC records, and aligning the 'From' domain with the Return-Path (also known as the envelope sender or 5321.MailFrom address). The 'via' tag appears when Gmail detects that the email isn't fully authenticated, indicating a potential mismatch between the sending server and the domain in the 'From' header. For subdomains, it's essential to ensure that SPF and DKIM records are correctly set up for the specific subdomain. Some sources suggest that SPF alignment alone might be sufficient, while others highlight the importance of DKIM and DMARC alignment. Overall, proper authentication helps Gmail identify legitimate messages and improves domain reputation.

Key findings

  • SPF, DKIM, DMARC Authentication: Implementing SPF, DKIM, and DMARC records is essential for proper email authentication and removing the 'via' message.
  • Domain Alignment: Aligning the 'From' domain with the Return-Path is crucial to prevent Gmail from displaying the 'via' tag.
  • Subdomain Configuration: Ensure SPF and DKIM records are correctly set up for any subdomains used for sending emails.
  • Gmail Authentication Check: The 'via' tag indicates that Gmail suspects the sending server is not properly authorized for the 'From' domain.

Key considerations

  • Return-Path Setup: Ensuring the 5321.From (return-path) uses the same domain as the 5322.From (header from) will remove the message. In some cases you can use a custom SPF record.
  • SPF vs DKIM: While DMARC will check both SPF and DKIM alignment, some sources suggest that you can use one or the other and the via message will dissapear
  • Domain Reputation Improvement: Proper email authentication contributes to building a positive domain reputation, which can improve email deliverability.
  • Message Authentication: The ultimate goal is to tell Gmail who has permission to send messages on your behalf to improve message authentication

What email marketers say
11Marketer opinions

To remove the 'via' message in Gmail when sending from a subdomain, the consensus is to ensure proper email authentication. This primarily involves aligning the 'From' domain with the Return-Path (envelope from) domain. Implementing SPF, DKIM, and DMARC records is crucial. For subdomains, these records must be correctly configured for the specific subdomain. Some sources suggest that DKIM alignment might be sufficient, while others indicate that SPF alignment at the Return-Path level can also work. Ultimately, Gmail uses the 'via' tag to indicate that the sending server isn't directly associated with your domain, and proper authentication helps Gmail recognize your emails as legitimate.

Key opinions

  • SPF, DKIM, DMARC: Implementing SPF, DKIM, and DMARC authentication is essential for removing the 'via' message.
  • Domain Alignment: The 'From' domain and the Return-Path domain must align to prevent Gmail from displaying the 'via' tag.
  • Subdomain Configuration: If sending from a subdomain, ensure SPF and DKIM records are specifically configured for that subdomain.
  • Authentication Message: The 'via' tag indicates that Gmail suspects the sending server isn't directly authorized for the 'From' domain.

Key considerations

  • Authentication Method: While aligning both SPF and DKIM is generally recommended, some sources suggest SPF alignment alone might be sufficient.
  • Subdomain Setup: Pay close attention to SPF and DKIM record setup for subdomains, as incorrect configuration is a common cause of the 'via' message.
  • DMARC Policy: A DMARC policy helps instruct email providers on how to handle unauthenticated emails, further improving deliverability and trust.
  • Domain Reputation: Gmail increasingly focuses on the sending domain's reputation. Properly authenticating your emails contributes to a positive reputation.
Marketer view

Email marketer from MailPoet shares that one of the best practices is to configure SPF and DKIM correctly so that Gmail recognizes that you have authorized the sending source. If you're using a subdomain for sending, ensure that the SPF and DKIM records cover the subdomain.

June 2022 - MailPoet
Marketer view

Email marketer from Webmasters StackExchange explains that the 'via' tag appears when the sending server isn't directly associated with your domain. Authenticate your email with SPF and DKIM records to verify your domain and remove the tag.

May 2023 - Webmasters StackExchange
Marketer view

Email marketer from Email Geeks shares that aligning at the Return-Path level (SPF alignment) without DKIM alignment can also remove the "via" message.

February 2025 - Email Geeks
Marketer view

Email marketer from Litmus explains that If your email isn’t properly authenticated, and the “envelope from” domain (also known as the “Return-Path”) doesn’t match the domain in the “From” header, Gmail will add a “via” tag to your emails. Ensuring that the “From” domain and Return-Path match—and that your email authentication is properly configured—will prevent the “via” tag from showing. This applies to subdomains also.

July 2023 - Litmus
Marketer view

Email marketer from SendPulse explains that to remove via Tag you need to: Set up SPF record. This is an email authentication method that specifies which mail servers are allowed to send emails on behalf of your domain. You have to create a DKIM signature. Use the DMARC protocol. Ask the email service to use your domain for sending email.

August 2022 - SendPulse
Marketer view

Email marketer from StackOverflow shares that you need to align your SPF and DKIM records. Make sure the domain used to send the email matches the domain in your 'From' address to avoid the 'via' tag.

December 2024 - StackOverflow
Marketer view

Email marketer from Reddit explains that to get rid of the 'via' tag in Gmail, you need to set up SPF and DKIM records for your sending domain. If you're sending from a subdomain, make sure the SPF and DKIM records are set up correctly for the subdomain as well.

February 2023 - Reddit
Marketer view

Email marketer from SparkPost explains that Gmail is increasingly focused on the reputation of the sending domain as part of the overall email authentication and spam scoring process. To remove the “via” tag, the sending domain’s authentication needs to be aligned. This means ensuring SPF, DKIM, and DMARC protocols are properly configured. This is also applicable if you are sending with a subdomain.

June 2021 - SparkPost
Marketer view

Email marketer from Email Geeks explains that to remove the "via" message in Gmail, the 5321.From (return-path) should use the same domain as the 5322.From.

May 2023 - Email Geeks
Marketer view

Email marketer from GMass explains that the dreaded “via” label in Gmail is often the result of not properly authenticating your email. Gmail is telling its users that the email didn’t actually originate from the domain it claims to be from. Correct SPF and DKIM records will fix this problem. Also you must have a DMARC record.

July 2022 - GMass
Marketer view

Email marketer from Email Geeks shares that signing the DKIM domain with the same key as the return-path domain can solve the "via XXXX" problem, even if there's a difference in 5321 vs 5322 domains.

February 2025 - Email Geeks

What the experts say
3Expert opinions

The 'via' message in Gmail appears when the message isn't fully authenticated. To remove it, the sending domain must be properly authenticated. This involves aligning the envelope from (return-path) and the header from. SPF and DKIM, especially DKIM alignment, are essential for proper authentication.

Key opinions

  • Full Authentication Required: The 'via' message indicates incomplete authentication of the email.
  • Domain Alignment: The envelope from (return-path) and header from domains must align.
  • SPF and DKIM: SPF and DKIM are critical for verifying the sender's authorization.
  • DKIM Alignment: DKIM alignment is particularly important for removing the 'via' message.

Key considerations

  • Authentication Method Choice: You can use either your own domain or a custom SPF domain for signing.
  • Server Authorization: Ensure the sending server is clearly authorized to send emails for the domain in the From: header.
Expert view

Expert from Word to the Wise explains that Gmail adds the 'via' because the message is sent by a server that isn't clearly authorized to send for the domain in the From: header. SPF and DKIM, especially DKIM alignment, are key to removing it.

April 2023 - Word to the Wise
Expert view

Expert from Word to the Wise explains that Gmail shows the "via" when the message is not fully authenticated. To remove it, the sending domain must authenticate correctly, aligning the envelope from (return-path) and the header from.

August 2022 - Word to the Wise
Expert view

Expert from Email Geeks shares it's been that way since 2011 / 2012. You sign with either your own d= or use a custom SPF domain and the via goes away

August 2023 - Email Geeks

What the documentation says
4Technical articles

To remove the 'via' message in Gmail when sending from a subdomain, it's essential to ensure proper email authentication using SPF, DKIM, and DMARC. Gmail displays the 'via' tag when the domain in the 'From' header doesn't match the actual sending domain. DMARC alignment is particularly crucial. Also, the Return-Path should match the From domain for consistent authentication.

Key findings

  • SPF, DKIM, and DMARC: Implementing SPF, DKIM, and DMARC is crucial for email authentication.
  • Domain Mismatch: The 'via' tag appears when there's a mismatch between the domain in the 'From' header and the actual sending domain.
  • DMARC Alignment: DMARC alignment is key to removing the 'via' tag.
  • Return-Path Importance: The Return-Path should match the From domain for consistent authentication.

Key considerations

  • Authentication Consistency: Consistent authentication helps Gmail identify legitimate messages.
  • Return-Path vs. From: The Return-Path is where bounce messages are sent, while the From address is what's displayed to the recipient.
Technical article

Documentation from Mailjet explains that The “via” tag is displayed when there is a mismatch between the domain specified in the “From” address and the actual sending domain. Ensure that your sending domain is properly authenticated with SPF, DKIM, and DMARC records and that the Return-Path matches the From domain.

August 2022 - Mailjet
Technical article

Documentation from Google Workspace Admin Help explains that to prevent the 'via' message, ensure your messages are authenticated using SPF, DKIM, and DMARC. Consistent authentication helps Gmail identify legitimate messages from your domain.

May 2022 - Google Workspace Admin Help
Technical article

Documentation from RFC-Editor clarifies that: The Return-path, also known as the envelope sender or 5321.MailFrom address, is the email address to which bounce messages are sent. The From address, also known as the 5322.From address, is the email address displayed to the recipient as the sender of the email.

February 2025 - RFC-Editor
Technical article

Documentation from EasyDMARC explains that Gmail shows the ‘via’ tag when the domain in the ‘From’ header doesn’t match the domain that actually sent the email. Implementing SPF, DKIM, and DMARC, especially DMARC alignment, is key to removing the tag.

July 2023 - EasyDMARC