How to use Google Workspace or Microsoft 365 email with my Webway domain

Your website and your email don't have to be in the same place. Google and Microsoft give you the records to add; you add them in your Webway DNS zone, and tell the Webway server to stop handling mail for the domain.

These steps assume your domain uses Webway's nameservers (dns1.webway.host and dns2.webway.host). If your DNS is at Cloudflare or your registrar, add the same records there instead.

Before you start

  1. Sign up for Google Workspace or Microsoft 365 and add your domain there. Their setup wizard gives you the exact records for your account. Use those values, because they can differ by account and change over time.
  2. If you have existing mail on Webway, plan to move it (Step 5) before you switch the records.
  3. Create every mailbox in Google or Microsoft before you switch, or incoming mail to those addresses will bounce.

Step 1: Verify the domain

Google and Microsoft each ask you to prove you own the domain with a TXT record.

  1. Copy the verification value from their wizard. Google's starts google-site-verification=; Microsoft's starts MS=ms.
  2. Add a TXT record at the domain itself (the "root" or @ name) with that value. See How to edit my DNS records.
  3. Back in their wizard, click Verify. It can take up to an hour for them to see the record.

Step 2: Point mail to them (MX records)

MX records decide where email for your domain is delivered.

  1. In your DNS zone, delete the existing MX record pointing to mail.yourdomain.
  2. Add the MX records from the wizard.

Google Workspace currently gives new accounts one record:

Name Type Priority Value
@ MX 1 smtp.google.com

Older Google accounts use five records (aspmx.l.google.com and alt1–alt4). Use whatever your admin console shows.

Microsoft 365 gives one record unique to your domain:

Name Type Priority Value
@ MX 0 yourdomain-co-za.mail.protection.outlook.com (yours will differ)

Plus, for Outlook autodiscovery:

Name Type Value
autodiscover CNAME autodiscover.outlook.com

Step 3: Tell the Webway server to stop handling mail

This is the step people miss. Even with MX records pointing elsewhere, a server that thinks it hosts your domain's mail delivers locally any message sent from a website or mailbox on the same server, and those messages never reach Google or Microsoft.

cPanel

  1. Go to Email → Email Routing.
  2. Choose the domain.
  3. Select Remote Mail Exchanger.
  4. Click Change.

DirectAdmin

  1. Go to E-mail Manager → MX Records.
  2. Choose the domain if you have more than one.
  3. Untick Use this server to handle my e-mails.
  4. Save.

This also means your website's contact forms send to Google or Microsoft correctly.

Step 4: SPF, DKIM and DMARC

Your old SPF record allows the Webway server. Replace it so Google or Microsoft is allowed instead, or mail you send from them fails checks and lands in spam.

  1. Edit the existing TXT record starting v=spf1 at @. Replace its value with the one from the wizard:

    • Google: v=spf1 include:_spf.google.com ~all
    • Microsoft: v=spf1 include:spf.protection.outlook.com -all

    If your website also sends email through the Webway server (for example WordPress notifications), keep the Webway part too. A domain may have only one SPF record. See How to set up SPF, DKIM and DMARC for my domain.

  2. DKIM: turn it on in the Google or Microsoft admin console and add the record(s) they give you. Google gives a TXT record at google._domainkey; Microsoft gives two CNAME records at selector1._domainkey and selector2._domainkey. Leave any existing Webway DKIM record alone; it uses a different name.

  3. DMARC: if you don't have one, add a TXT record at _dmarc with v=DMARC1; p=none; rua=mailto:you@yourdomain.

Step 5: Move existing mail

If mailboxes on Webway hold mail you want to keep:

  • Google Workspace: in the admin console, use Data migration with your Webway IMAP settings (mail.yourdomain, port 993, SSL). See Email server settings: IMAP, POP3 and SMTP.
  • Microsoft 365: in the Exchange admin centre, use an IMAP migration with the same settings.
  • Either: add both accounts to an email program and drag folders across.

Run the migration before switching MX records, then once more afterwards to catch anything that arrived during the switch.

Step 6: Switch devices and test

  1. Remove the old Webway account from phones and computers, and add the Google or Microsoft account instead.
  2. Send a test email from an outside address to your domain. It should arrive in Google or Microsoft.
  3. Send a test from your new account to an outside address. Check it lands in the inbox, not spam.
  4. Test your website's contact form.

DNS changes take up to a few hours to spread. See How long does DNS propagation take?

Common problems

Problem Cause Fix
Mail from the website's contact form never arrives Step 3 not done Set Email Routing to Remote, or untick "Use this server"
Some mail still lands in the old Webway mailbox Old MX record still present, or propagation not finished Delete the old MX record. Wait a few hours
Verification fails TXT record at the wrong name, or not yet propagated The name must be the bare domain (@). Wait an hour and retry
Sent mail goes to spam SPF still points to Webway, or DKIM not set Step 4
Bounce "550 no such user" Mailbox not created at Google or Microsoft Create it there

Still stuck?

Open a support ticket and include:

  • Your domain, and whether you're moving to Google Workspace or Microsoft 365.
  • Which steps you've completed.
  • The MX and TXT records currently in your zone (a screenshot of the zone editor is fine).
  • A bounce message or test result showing the problem.

Did this answer it?