smtp.google.com with priority 1. Add include:_spf.google.com to your SPF record, publish the DKIM key from the Google Admin console, and add a DMARC record.Why use Gmail for your domain
Google Workspace gives you Gmail with your own domain, for example you@example.com, with Google’s spam filtering, large mailboxes and mobile apps. Your website stays on your cPanel hosting; only email moves to Google. This split is common for businesses that rely heavily on email.
Before you start
- ✓ A Google Workspace subscription for your domain.
- ✓ Access to cPanel, or to wherever your domain’s DNS is managed (for example Cloudflare).
- ✓ A list of existing mailboxes, so you can create the same addresses in Google Workspace.
- ✓ A plan for old mail: Google’s data migration tool can copy mail from your cPanel mailboxes over IMAP.
Step 1: verify your domain with Google
Google gives you a TXT record to prove you own the domain. In cPanel, open Domains > Zone Editor, click Manage next to the domain, add a TXT record with the value Google gives you, and click Verify in the Google Admin console.
Step 2: tell cPanel that mail is handled elsewhere
- In cPanel, open Email > Email Routing.
- Choose the domain.
- Select Remote Mail Exchanger and save.
This matters: without it, the server still thinks it hosts your mail, and messages sent from your website or other accounts on the server to your domain are delivered locally instead of to Gmail.
Step 3: change the MX records
In Zone Editor, delete the existing MX records for the domain, then add Google’s:
| Type | Priority | Destination |
|---|---|---|
| MX | 1 | smtp.google.com |
Google now recommends this single MX record for new setups. Older setups that use the five ASPMX records still work. Check Google’s current MX instructions before you change anything, and keep the TTL low during the switch.
Step 4: update SPF
SPF lists the servers allowed to send mail for your domain. Edit the existing TXT record that starts with v=spf1; do not add a second one. If your website also sends mail from the cPanel server, keep the server:
v=spf1 +a +mx include:_spf.google.com ~all
Replace +a +mx with your actual server entries if your record already lists them. One domain must have only one SPF record.
Step 5: turn on DKIM in Google
- In the Google Admin console, go to Apps > Google Workspace > Gmail > Authenticate email.
- Generate a new DKIM record (2048-bit if your DNS supports it).
- Add the TXT record it shows (usually named
google._domainkey) in cPanel’s Zone Editor. - Wait a little, then click Start authentication in the Admin console.
You can keep cPanel’s own DKIM record (default._domainkey) for mail your website sends from the server.
Step 6: add DMARC
DMARC tells receiving servers what to do with mail that fails SPF and DKIM. Start in monitoring mode:
Name: _dmarc.example.com
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:dmarc@example.com
After a few weeks of clean reports, move to p=quarantine. See our guide to fixing mail DNS records.
Step 7: test
- ✓ Send a message from an outside account to your address, and check it arrives in Gmail.
- ✓ Reply from Gmail and check the headers show SPF, DKIM and DMARC as pass.
- ✓ Submit your website’s contact form, and check the message arrives in Gmail.
If your site sends mail
Website forms send mail from the cPanel server by default. With SPF set as above, that keeps working. For the best delivery, configure your website to send through Google’s SMTP relay or an authenticated Gmail account with an SMTP plugin.
Need help with this?
Prefer email that stays with your hosting? Our hosting plans include email, or we can help you set up Google Workspace correctly.
Frequently asked questions
What MX record does Google Workspace use?
For new setups, Google recommends a single MX record, smtp.google.com, with priority 1.
Why do emails from my website not reach Gmail after switching?
Email Routing in cPanel is probably still set to Local Mail Exchanger. Set it to Remote Mail Exchanger.
Can I keep some mailboxes on cPanel and some on Gmail?
Not easily with a single domain, because MX records send all mail for the domain to one place. Use a subdomain for the second system.
Do I need to delete my cPanel email accounts?
Not straight away. Keep them until old mail has been copied to Google, then remove them.
Can I use free Gmail with my domain?
Free Gmail cannot receive mail for your domain directly. Use Google Workspace, or forward your domain mail to a Gmail address.
Related guides
