Setup Google Workspace
Info
This page provides step-by-step instructions (with screenshots) on how to setup Google Workspace for your domains, and is the companion of my Migrating to Google Workspace: Solving Email Routing Challenge blog post
Create a Google Workspace Account¶
Create an account
- Go to the Google Workspace website and select
Get Started Now
- Enter the business name, number of users, region, and click
Next
- Enter your contact information and click
Next
- Confirm you have a domain you can use for the setup
- Enter the domain you want to use as Primary Domain and click
Next
- Provide a secondary email address to be used as recovery email and click
Next
- Choose a username and password for the admin account
- Provide a phone number to verify your identity, then enter the verification code (without the
G-
prefix) - Accept the terms and conditions and click
I understand
Pick a subscription
- Enter your contact/billing information.
- Notice that Google will try to put you in a more expensive Business Plus plan by default. We will change it later.
- Notice that Google will try to put you in a more expensive Business Plus plan by default. We will change it later.
- Go to
Billing > Subscriptions > Add or upgrade subscription
- Pick the Plan that you prefer (I chose
Business Starter
) and clickSWITCH
- You can find the breakdown of the different plans here
- You can find the breakdown of the different plans here
- Pick a payment plan (I chose
Annual
), thenCHECKOUT
Verify your Primary Domain
- In the Admin Console's homepage you should have a banner prompting you to verify your domain
- Add the TXT record of the verification code to your DNS provider
- For example, if you use Cloudflare and Terraform, you could add the following resource:
resource "cloudflare_record" "google_workspace_verification" { zone_id = cloudflare_zone.xxxxx.id name = "example.com" value = "google-site-verification=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" type = "TXT" proxied = "false" ttl = 86400 comment = "Google Workspace" }
- For example, if you use Cloudflare and Terraform, you could add the following resource:
- Once ready, select
Verify my domain
Harden the Admin user
- In the top-right corner, click on your profile picture and select
Manage your Google Account
- Add MFA
- Add Passkeys
- Enrol in the Advanced Protection Program
Setup Gmail for the Primary Domain¶
Create Aliases
- In the Admin Console, go to
Directory > Users
and select the user you want to create an alias for - Click on
Add Alternative Emails
, and enter the aliases you want to create
Setup the MX records
- In the Admin Console's homepage you should have a banner prompting you to setup the MX records
- Confirm you are ready to transfer the MX records
- Add the MX records to your DNS provider
- For example, if you use Cloudflare and Terraform, that's the process:
- Add the following resources to your Terraform, but do no apply yet:
resource "cloudflare_record" "google_workspace_mx" { zone_id = cloudflare_zone.xxxxx.id name = "example.com" value = "XXXXXX" type = "MX" proxied = "false" ttl = 3600 priority = 1 comment = "Google Workspace MX" } resource "cloudflare_record" "google_workspace_alt_1" { zone_id = cloudflare_zone.xxxxx.id name = "example.com" value = "XXXXXX" type = "MX" proxied = "false" ttl = 3600 priority = 5 comment = "Google Workspace MX" } # And so on for the other alternative records...
- Remove the Cloudflare MX records from your Terraform, but do not apply yet
- In the Cloudflare Dashboard, select your domain then
Email > Email Routing > Settings
- Select the
...
button, thenDisable Email Routing > Unlock but keep records
- Apply your Terraform changes
- Add the following resources to your Terraform, but do no apply yet:
- For example, if you use Cloudflare and Terraform, that's the process:
- Go back to the Admin Console, and once ready select
Activate Gmail
Setup a Catch-All Address
- In the Admin Console, go to
Apps > Google Workspace > Gmail > Default Routing
- Click on
Configure
- In the configuration settings, change the selection to
All Recipients
to ensure that emails sent to any address are captured by the catch-all address - Under
Envelope Recipient
, selectChange envelope recipient > Replace recipient
, and add the email address you want to use as catch-all
Authenticate outgoing emails (DKIM)
- In the Admin Console, go to
Apps > Google Workspace > Gmail > Authenticate email
- Select your primary domain, then
GENERATE NEW RECORD
- Add the TXT record to your DNS provider
- For example, if you use Cloudflare and Terraform, you could add the following resource:
resource "cloudflare_record" "google_workspace_dkim" { zone_id = cloudflare_zone.xxxxx.id name = "google._domainkey" value = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" type = "TXT" proxied = "false" ttl = 600 comment = "DKIM for Google Workspace" }
- For example, if you use Cloudflare and Terraform, you could add the following resource:
- Once ready, select
START AUTHENTICATION
Setup an Outbound Gateway
- In order to allow aliases to send emails, you need to setup an Outbound Gateway
- In the Admin Console, go to
Apps > Google Workspace > Gmail > End User Access
- In the
Allow per-user outbound gateways
section, selectAllow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domains
Setup Gmail for the Secondary Domains¶
Verify Secondary Domain
- In the Admin Console, go to
Account > Domains > Manage domains
and selectAdd a domain
1 - Enter the name of the domain you are adding, and select a domain type (I chose
User alias domain
) 2 - Select
Add domain and start verification
- Add the TXT record of the verification code to your DNS provider
- Once ready, select
Verify my domain
Setup the MX records
- In the Admin Console, go to
Account > Domains > Manage domains
- Select
Activate Gmail
for the domain you just added - Confirm you are ready to transfer the MX records (similar to the Primary setup)
- Add the MX records to your DNS provider (similar to the Primary setup)
- Add the new MX records to your Terraform, but do no apply yet
- Remove the Cloudflare MX records from your Terraform, but do not apply yet
- In the Cloudflare Dashboard, select your domain then
Email > Email Routing > Settings
- Select the
...
button, thenDisable Email Routing > Unlock but keep records
- Apply your Terraform changes
- Go back to the Admin Console, and once ready select
Activate Gmail
(similar to the Primary setup)
Authenticate outgoing emails (DKIM)
- In the Admin Console, go to
Apps > Google Workspace > Gmail > Authenticate email
- Select the domain you just added, then
GENERATE NEW RECORD
(similar to the Primary setup) - Add the TXT record to your DNS provider (similar to the Primary setup)
- Once ready, select
START AUTHENTICATION
Configure Gmail client for outbound
- In Gmail, go to
Settings > Accounts > Send mail as
and add the new email (ticktreat as alias
)