Skip to main content

Use Google Workspace or Microsoft 365 with your domain

You can keep your domain and website where they are and use an outside email provider, such as Google Workspace or Microsoft 365, for your mailboxes. The provider handles the mailboxes; your DNS tells the rest of the internet to deliver mail there. This guide walks through the DNS changes in a safe order and explains how to move existing mail without losing messages.

What changes and what stays​

Only email records change. The records for your website, such as the A, AAAA and www records, stay exactly as they are, so the website keeps working throughout.

RecordPurposeAction
TXT (verification)Proves to the provider that you own the domainAdd
MXSays where email for the domain is deliveredReplace
TXT (SPF)Lists servers allowed to send for the domainUpdate
TXT or CNAME (DKIM)Lets receivers check message signaturesAdd
TXT (DMARC)Tells receivers what to do with failed messagesAdd or review
A, AAAA, wwwYour websiteLeave unchanged

DNS records explained describes each record type.

1. Verify that you own the domain​

The provider gives you a verification TXT record in its admin console. Add it as a new TXT record at your DNS host, using the name and value exactly as shown. Do not replace or delete other TXT records, such as an existing SPF record. Then return to the admin console and start the verification check. If it fails, wait for the record's TTL to pass and try again.

2. Create the mailboxes before you switch​

Set up every user, alias and shared address at the new provider before you change the MX records. If mail arrives for an address that does not exist there yet, it bounces.

3. Replace the MX records​

MX records decide where email for your domain is delivered. Copy the MX values from your provider's admin console exactly as shown, including the priority numbers, because each provider's values are different and can change over time.

  1. Lower the TTL on your existing MX records a day ahead, if your DNS host allows it, so the switch takes effect faster.
  2. Delete the old MX records. Keep a copy of their values in case you need to switch back.
  3. Add the new MX records exactly as your provider shows them.
  4. Check the result with dig +short example.com MX, or nslookup -type=mx example.com on Windows.
Avoid split delivery

Do not keep old MX records alongside the new ones. When a domain has MX records for two different providers, senders deliver some messages to each, and mail seems to go missing at random. A domain should have MX records for one provider only, unless your provider gives you a specific setup for running both.

4. Update SPF​

Your SPF record lists the services allowed to send email for your domain. Add the include: value your provider gives you to your existing SPF record, rather than creating a second one. A domain may have only one SPF record.

example.com. 3600 IN TXT "v=spf1 include:_spf.example.net ~all"

In this example, include:_spf.example.net stands in for your provider's value. If your website or another service also sends email for the domain, keep its entry in the same record. Remove the old email provider's entry once you no longer send through it.

5. Turn on DKIM​

DKIM signs your outgoing messages so receivers can check they are genuine. In the provider's admin console, find the DKIM setting for your domain. It gives you one or more records to add, usually TXT or CNAME records with a special name such as selector._domainkey. Add them exactly as shown, wait for them to be visible, then switch DKIM on in the console.

6. Add or review DMARC​

A DMARC record tells receivers what to do with messages that fail SPF and DKIM. If you do not have one, start with a monitoring policy and tighten it once reports show that all your legitimate mail passes:

_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"

SPF, DKIM and DMARC explained explains how to read the reports and when to move to a stricter policy.

7. Move existing mail​

Most providers offer a migration tool that copies existing messages from your old mailbox over IMAP. Run it once before the MX change and again afterwards to pick up any messages that arrived at the old provider during the switch. Keep the old mailboxes for a few weeks before you cancel them.

Once mail is flowing, set up each device with the new provider's apps or settings. Set up email on your devices covers the general process.

At DomainPilot

DNS management is included with no extra fees for every domain registered with DomainPilot, so you can add the records an outside email provider asks for. For help with SPF, DKIM and DMARC in your DomainPilot account, see Set up SPF, DKIM and DMARC.

Did this article help you?