How to determine if an email address is a Google Workspace account?
Summary
What email marketers say10Marketer opinions
Marketer from Email Geeks shares a command line script for checking MX records against Google.
Email marketer from Email Hippo describes leveraging email verification services that offer Google Workspace detection as part of their features. These services often perform MX record checks and other validation steps to identify Google Workspace accounts.
Marketer from Email Geeks responds to check the MX record.
Marketer from Email Geeks shares they use Validity or Inbox Monster's analyzer to determine Google Workspace accounts from a list.
Email marketer from Web Hosting Forum responds saying a Google Workspace email can be identified because if it is correctly configured there should be some MX records that reference google.
Email marketer from Hunter.io suggests a google workspace email can be identified from email verifiers which connect to the mail server and simulate sending an email to check if the email bounces and see what the provider is.
Email marketer from Reddit suggests performing an MX record lookup on the domain part of the email address. If the MX records point to Google's servers, the email is likely a Google Workspace account. Various online tools and command-line utilities (like `dig` or `nslookup`) can be used for this lookup.
Marketer from Email Geeks responds with a command line `dig mx example.com`.
Email marketer from Stack Overflow suggests using a Google Apps Lookup script. The script checks if the domain of the email address is registered with Google Apps using the undocumented API. Returns true if the domain is Google Apps domain.
Email marketer from DNSQueries advises using an online tool to lookup DNS records. Suggesting entering the domain portion of the email address into the tool and checking the tool output for MX records that belong to google.
What the experts say3Expert opinions
Expert from Spam Resource explains that determining if an email address is a Google Apps/Workspace account can be done by checking the domain's DNS records. Specifically, checking for MX records pointing to Google's mail servers (ASPMX.L.GOOGLE.COM, etc.) and also checking for a TXT record with the value 'v=spf1 include:_spf.google.com ~all'.
Expert from Word to the Wise shares that one way to identify Google Workspace accounts is to inspect the SPF records. If the domain uses Google Workspace, the SPF record should include `_spf.google.com`. This indicates that Google's mail servers are authorized to send emails on behalf of that domain.
Expert from Email Geeks answers to check if 'it' MX's to Google.
What the documentation says3Technical articles
Documentation from Google Workspace Admin Help details using the Directory API to check if an email address is associated with a Google Workspace account. It involves authenticating with the API, then querying the Users collection to find the user's information. If the user exists, the email address is a Google Workspace account user.
Documentation from Google Domains Help explains that you can identify Google Workspace accounts by checking the MX records associated with the domain of the email address. Google Workspace accounts will have MX records pointing to Google's servers (e.g., ASPMX.L.GOOGLE.COM).
Documentation from Microsoft explains how to use PowerShell to query DNS records, including MX records. You can use `Resolve-DnsName -Name example.com -Type MX` to find MX records. If records point to Google then it could be a google workspace account.