Guides Client area

How to set up email with Google Workspace or Microsoft 365

In short
  • Email setup adds the Google Workspace DNS records, or the Microsoft 365 ones, without typing them by hand.
  • You find it in “My domains” → your domain → “DNS records” → “Set up email”.
  • You see every change before it is applied, and you can undo the setup later.
  • It is part of the free Gatehills DNS; the email service itself is paid to Google or Microsoft.

On Gatehills you add the Google Workspace DNS records or the Microsoft 365 DNS records from DNS records → Set up email. Choose the service, paste the verification value, check the preview and apply. MX, SPF, verification and DKIM are written in one step; the setup is free and you can undo it.

When you sign up for Google Workspace or Microsoft 365, the provider asks you to add DNS records so that email for you@example.com reaches their servers: MX records, an SPF record, a verification code and DKIM keys. The Email setup page builds these records for you from the official values, shows you exactly what changes in your zone, and applies everything in one step.

What are MX, SPF, DKIM and DMARC records?

Email DNS records in brief
RecordTypeWhat it does
MXMXTells other mail servers where to deliver email for your domain
SPFTXTLists the servers allowed to send email for your domain
VerificationTXTProves to Google or Microsoft that you control the domain
DKIMTXT or CNAMEPublishes the key that signs your outgoing email
DMARCTXT on _dmarcTells receivers what to do with email that fails SPF and DKIM; p=none only collects reports
AutodiscoverCNAMELets Outlook find the Microsoft 365 settings by itself

A domain must have only one SPF record (a rule of RFC 7208). That is why the setup never adds a second one: it puts the new include: into the record you already have. If the SPF record needs more than the 10 DNS lookups allowed, the preview tells you.

Google Workspace DNS records: the DNS records tab of example.com with the Set up email button and the choice between Google Workspace and Microsoft 365
1. the DNS records tab · 2. Set up email · 3. choose your email service

Set up Google Workspace or Microsoft 365

  1. Open the DNS records of your domain

    Sign in, choose “My domains”, click the domain and open the “DNS records” tab (1).

  2. Open Email setup

    In the box “Google Workspace or Microsoft 365?” click “Set up email” (2). The “Email setup” page opens.

  3. Choose your service

    Under “Choose your email service” click “Google Workspace” or “Microsoft 365” (3).

  4. Paste the values from your provider

    In “Verification record (optional)” paste the TXT value from the Google Admin console (“google-site-verification=…”) or from the Microsoft 365 admin center (“MS=ms…”). For Google you can also paste the “DKIM key (optional)”. For Microsoft you can paste the “MX record (optional)”, the two DKIM values (“DKIM selector1 (optional)” and “DKIM selector2 (optional)”) or “Or your initial onmicrosoft.com domain”, and tick Intune or Teams if you use them.

  5. Choose the options

    Leave “Remove the other MX records (recommended)” ticked so that all email goes to the new service. Tick “Add a DMARC record (p=none) if there is none” if you want a basic DMARC record.

  6. Preview and apply

    Click “Preview the changes”. The table “Changes to the zone” lists each record with “Add”, “Change” or “Remove” and the values “Now” and “After”. Read any warnings, then click “Apply the changes”. To start again, click “Change service”.

  7. Finish the verification

    The records are published on our name servers within a few minutes. Go back to the admin console of Google or Microsoft and complete the verification of the domain there.

The Google Workspace form with the verification record and options, the table of changes to the zone and the Apply the changes button
1. verification record · 2. Preview the changes · 3. Changes to the zone · 4. Apply the changes

Which Google Workspace DNS records does the setup add?

Records added by the setup
ServiceMXSPF (TXT)Other records
Google Workspacesmtp.google.com, priority 1include:_spf.google.comVerification TXT, DKIM TXT (selector google unless you change it)
Microsoft 365example-com.mail.protection.outlook.com, priority 0include:spf.protection.outlook.comAutodiscover CNAME, verification TXT, DKIM CNAME selector1 and selector2, optional Intune and Teams

For Microsoft 365 the MX value is calculated from your domain (dots become hyphens). If the Microsoft 365 admin center shows a newer value ending in .mx.microsoft, paste it in MX record (optional). A new SPF record is v=spf1 include:_spf.google.com ~all for Google and v=spf1 include:spf.protection.outlook.com -all for Microsoft. A DMARC record already in place is kept as it is.

Undo the setup

On the Email setup page you see the last setup, when and by whom it was applied. Click Undo this setup and confirm to put back the previous records. Records you changed by hand after the setup are not touched.

What does the preview warn you about?

Before anything changes, the preview lists the warnings for your zone:

  • other MX records remain, so email may be split between two services;
  • Gatehills email forwarding will be turned off, or stays on next to the new service;
  • several SPF records were merged into one, or the SPF record needs more than 10 DNS lookups;
  • a name is skipped because it has other records or is reserved;
  • an existing value is replaced, or an existing DMARC record is kept.

When you click Apply the changes, the plan is calculated again on the records of that moment, so changes made in the meantime are not lost.

Do I need the verification code to start?

No, it is optional. You can apply the MX and SPF records first and run the setup again later with the verification and DKIM values: records already in place are not duplicated.

How long until email works?

Our name servers are updated within a few minutes. Other networks may keep the old MX records until their TTL expires, usually within an hour.

Will I lose my current emails?

The setup changes only DNS records. Messages already stored with your old provider stay there; new email is delivered to Google or Microsoft.

Can I switch back to Gatehills email forwarding?

Yes: click Undo this setup, then check the Email tab. See free email forwarding.

Why can I see the page but not apply changes?

You need the DNS function on the account. Ask the primary user; see people and account.

Sign in

Sign in to your Gatehills account to continue.