> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hostcloud.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Google Workspace or Microsoft 365 email

> Point your domain's email to Google Workspace or Microsoft 365 while keeping your website on HostCloud.

You can keep your website on HostCloud and use Google Workspace (Gmail) or Microsoft 365 (Outlook) for your business email. This guide shows you which DNS records to change, and one cPanel setting you mustn't skip.

> [!NOTE]
>
> This guide is for domains that use HostCloud nameservers, so DNS is edited in cPanel's **Zone Editor**. If your DNS is with Cloudflare or another provider, make the same changes there. See [Where to edit your DNS](/dns/where-to-edit-dns.md).

> [!WARNING]
>
> Once you change your MX records, new email goes to Google or Microsoft instead of your HostCloud mailboxes. Set up your mailboxes there first, and copy any old email you want to keep.

## Before you start

Start the domain setup in your Google Workspace or Microsoft 365 admin console. It shows the **exact** records to add for your domain, including a verification record. Always use the values it gives you. The ones below are typical examples.

## Step 1: Verify your domain

Your provider asks you to add a `TXT` record to prove you own the domain, for example `google-site-verification=…` or `MS=ms…`. Add it in **Zone Editor** as a TXT record for your domain. See [Add or edit DNS records](/dns/add-dns-records.md).

## Step 2: Change the MX records

**1. Open Zone Editor**

[Log in to cPanel](/cpanel/log-in-to-cpanel.md), open **Zone Editor**, and click **Manage** next to your domain.

**2. Remove the old MX record**

Find the existing `MX` record (usually pointing to your own domain or `mail.yourdomain.com`) and delete it.

**3. Add the new MX record**

Add the MX record your provider gave you:

| Provider | Priority | Destination (typical) |
| - | - | - |
| Google Workspace | `1` | `smtp.google.com` |
| Microsoft 365 | `0` | `yourdomain-com.mail.protection.outlook.com` (shown in your Microsoft 365 admin center) |

## Step 3: Set Email Routing to remote

This step is easy to miss. Without it, email sent from your website or from other accounts on our server may still be delivered to your old HostCloud mailboxes.

**1. Open Email Routing**

In cPanel, type **Email Routing** in the **Search Tools** box and open it.

**2. Choose remote**

Select your domain and choose **Remote Mail Exchanger**. Click **Change**.

## Step 4: Update SPF and add DKIM

So your emails aren't marked as spam, update your SPF record and turn on DKIM in your provider's admin console.

| Provider | SPF record (TXT, for your domain) |
| - | - |
| Google Workspace | `v=spf1 include:_spf.google.com ~all` |
| Microsoft 365 | `v=spf1 include:spf.protection.outlook.com ~all` |

If your website also sends email (for example, contact forms), your SPF record must include HostCloud too. Open **Email Deliverability** in cPanel to see the suggested record, and combine both into **one** SPF record. See [SPF, DKIM and DMARC explained](/dns/spf-dkim-dmarc.md).

DKIM is a record your provider generates for you. Copy it from their admin console into Zone Editor exactly as shown.

> [!NOTE]
>
> Microsoft 365 also asks for an `autodiscover` CNAME record so Outlook can set itself up. Add it from the Microsoft 365 admin center's list.

## Step 5: Wait and test

DNS changes can take up to 24 hours to work everywhere. Then send a test email to your address from a different account, and reply to it. See [How long DNS changes take to work](/dns/dns-propagation.md).

Still stuck? [Open a ticket](/support/open-a-ticket.md) with your domain name and which provider you're moving to.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.