Cloudflare: Activate Gmail for Google Workspace

Tell the internet where to deliver your company's email messages

Why do I need to do this?

When someone sends a message to, the sender's computer looks up the MX records for to figure out where to deliver that email message.

Before your company can use Gmail with your Google Workspace account, you need to change your domain's MX records so they direct your incoming messages to Google's mail servers. 

How this works

A Beginner's Guide to Signing up for Google Workspace

Every domain (like has a set of DNS records that can be viewed by anyone on the internet. DNS records tell computers how to find your website and where to deliver your company's email messages.

  • You'll get your new MX records from the Google Workspace setup tool.
  • You'll sign in to your domain registrar, delete any existing MX records for your domain that route messages to your current email provider, and add the Google MX records.
  • Once your domain registrar publishes the Google MX records, we'll activate Gmail for your domain.

Google can't change your MX records for you. Only the domain's owner can can do this. 

Before you begin

This won't be easy, but we're here to help.

DNS records have been around since the beginning of the internet. This can be a challenging task, and the steps are different for each domain. We've tried to make this chore as easy as possible, but you may get frustrated.

Please read carefully, and we'll help you get through this!

Get ready to activate Gmail

  • Every existing email address in your company has to be associated with a Google Workspace account. Use the setup tool to add any remaining email accounts.
  • Make sure now is a good time to make this change. It can take up to 48 hours for the rest of the internet to learn about your new MX records. Your old email provider might receive some messages during this time.  

You'll need to sign in to Cloudflare

Before you get started, make sure you have the account ID and password you need to sign in to Cloudflare. If you have trouble signing in to this account, find out how to change your Cloudflare password.

Open the Google Workspace setup tool

You must use the Google Workspace setup tool to complete this task. If you don't already have it open in another tab, click below to open it.

Open the setup tool

Important: We strongly suggest you follow the instructions in the setup tool and only return to this page if you need additional information.

I'm stuck and need help

I get an error when I click the blue button

The setup tool is for Google Workspace and Cloud Identity administrators only. It doesn't work with any other Google product.

Make sure you're signing in with an admin account.

It says Gmail is activated for my domain

Your MX records are already set up.

If you're reading this article because your company is having trouble receiving email:

My email address ends in

Oh no! You've ended up in the wrong place. Click here for help with issues.

How to activate Gmail for Google Workspace


Find your DNS records

Open Cloudflare and sign in with the account you used to buy your domain.
Click the domain you're setting up today, and then click DNS on the left.

The Cloudflare DNS option is highlighted.


Set up the MX records for Google Workspace

Scroll to DNS management and delete any existing MX records.

An MX record to be deleted is shown.

Click Add record, and then fill out the form.

All fields of the MX record are complete.

  • Select MX as the Type.
  • Enter @ in the Name field.
  • Paste one of the Google MX records from the Workspace setup tool into the Mail server field.
  • Enter the Priority for the MX record you just pasted.

Click Save to create your new MX record.

Where do I copy the Google MX records?

You should have the setup tool open in another tab. You can reopen the tool if you closed it.
Repeat Step B until you've added all 5 Google MX records. 

All MX records are shown in a table.

The setup tool wants me to add a sixth MX record

If you haven't protected your domain yet, the setup tool asks you to verify your domain while you're setting up your MX records. You need to enter a sixth MX record that includes a verification code that Google can use to confirm that you are the owner of your domain:

  1. Scroll to the Get your verification code section in the setup tool and click Copy
    The MX records table is shown and a red circle highlights the Copy button next to the MX verification record.
  2. Paste the verification code just like you did with the other Google MX records. 
  3. Enter 15 for the Priority of this MX record. 

Tell Google Workspace to activate Gmail

Return to the browser tab where you have the Google Workspace setup tool open. (You can reopen the tool if you closed it.)
Scroll to the bottom of the page and click Activate Gmail.

Important! Some registrars may require additional time to publish your MX records. If the Google Workspace setup tool can't find your new records, wait an hour before you try again.

If you need additional help with your DNS settings, please contact your registrar. They are experts in managing your domain and are eager to help you. 

You might have to wait and try again

Some registrars take longer than others to let the world know that you have a new email provider:

  • If Google Workspace can't find your new MX records, come back in a couple of hours and click the Activate button again.
  • After you activate Gmail, updates can take up to 48 hours. Until the rest of the internet notices your new MX records, you'll still get email messages in your old email client.
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center