Skip to main content

HostBible: Set up Google Workspace (formerly “G Suite”) email: create DNS records

Step‑by‑step: point your domain’s email to Google Workspace (G Suite) in cPanel

C
Written by Christopher Handscomb
Updated over 3 months ago

Who is this for?

Customers using HostBible cPanel hosting whose domain DNS is managed in cPanel and who want their domain email to work in Google Workspace (formerly G Suite).

At a glance (what you’ll do)

  1. Verify your domain with Google (TXT).

  2. Set Email Routing to Remote in cPanel.

  3. Add Google’s MX record(s).

  4. Publish SPF (TXT).

  5. Turn on DKIM (TXT).

  6. (Optional) Add DMARC (TXT) and custom CNAME for mail.yourdomain.com.

  7. Activate Gmail and test.

Before you start

  • Make sure your domain’s nameservers point to HostBible (so cPanel is authoritative for DNS).

  • Have Google Workspace Admin access.


1) Verify your domain with Google (TXT)

If you haven’t already verified your domain in the Google Admin console:

  1. In Google Admin: Account → Domains → Manage domains → Verify domain.

  2. Copy the TXT value that begins with google-site-verification=. Google Help

  3. In cPanel → Domains → Zone Editor → Manage (next to your domain) → + Add Record → Add “TXT” Record:

    • Name/Host: @ (or leave blank)

    • Type: TXT

    • Value: paste the google-site-verification TXT

    • Save.

  4. Back in Google, click Verify. It can take up to an hour to confirm (but often quicker). Google Help


2) Set Email Routing to Remote in cPanel

This prevents the HostBible server from trying to accept mail locally once you switch to Google.

  • Go to cPanel → Email → Email Routing

  • Choose your domain → select Remote Mail Exchanger (or Automatically Detect Configuration, which will set Remote when MX isn’t local) → Change. cPanel & WHM Documentation


3) Add Google’s MX records in cPanel

Recommended (single record) — for all domains, especially new setups

  • Host/Name: @

  • Type: MX

  • Priority: 1

  • Destination: smtp.google.com

  • Save.
    (Remove any non‑Google MX records so only Google’s remain.)
    Note: Propagation can take up to 72 hours; leave TTL at the default if unsure. Google Help

Legacy alternative (still supported)
If you prefer the older multi‑record setup (or you already use it and everything works), keep or add these five MX records:

  • ASPMX.L.GOOGLE.COM — priority 1

  • ALT1.ASPMX.L.GOOGLE.COM — priority 5

  • ALT2.ASPMX.L.GOOGLE.COM — priority 5

  • ALT3.ASPMX.L.GOOGLE.COM — priority 10

  • ALT4.ASPMX.L.GOOGLE.COM — priority 10
    (These legacy hosts remain supported; you don’t have to change if your email already works.) cPanel SupportGoogle Help

How to add in cPanel:
cPanel → Domains → Zone Editor → Manage → + Add Record → Add “MX” Record → fill fields above → Save. cPanel & WHM Documentation

After adding MX: In Google Admin, Activate Gmail for the domain (if prompted). Expect up to 72 hours for the change to be recognized globally. Google Help


4) Publish an SPF record (TXT)

SPF tells recipients that Google is allowed to send mail for your domain.

  • If you send only via Google Workspace, use:
    v=spf1 include:_spf.google.com ~all

  • If you also send via other services (Mailchimp, a CRM, etc.), combine them into one SPF record (never publish multiple SPF records for the same host). Example:
    v=spf1 include:_spf.google.com include:servers.mcsv.net ~all Google Help

How to add in cPanel:
Zone Editor → Manage → + Add Record → Add “TXT” Record


5) Turn on DKIM (TXT)

DKIM cryptographically signs your outgoing mail.

  1. In Google Admin: Apps → Google Workspace → Gmail → Authenticate email (DKIM).

  2. Click Generate New Record, choose 2048‑bit and the default selector google (unless you already use it).

  3. Copy the DNS Host name (e.g., google._domainkey) and the TXT value (v=DKIM1; k=rsa; p=...).

  4. In cPanel Zone Editor, add a TXT record:

    • Name/Host: google._domainkey

    • Type: TXT

    • Value: the long DKIM key from Admin console → Save.

  5. Back in Admin console, click Start authentication after DNS propagates. Google Help


6) (Optional) Add a DMARC record (TXT)

DMARC helps protect your brand from spoofing. Google recommends rolling it out gradually:

  • Start (monitor‑only):
    _dmarc.yourdomain.com (TXT) →
    v=DMARC1; p=none; rua=mailto:[email protected]; adkim=s; aspf=s
    (use a real reporting mailbox for rua)

  • Later, after reviewing reports, increase enforcement to p=quarantine or p=reject. Google Help+1

Add via Zone Editor → Add “DMARC” (creates TXT) or add a TXT manually as above. cPanel & WHM Documentation


7) (Optional) Create a friendly URL for Gmail

Prefer mail.yourdomain.com instead of the long default sign‑in URL?

  1. In Google Admin: Account settings → Custom URLs; set the Gmail prefix to mail.

  2. In cPanel Zone Editor, add a CNAME:

    • Name/Host: mail

    • Target/Value: ghs.googlehosted.comSave. Google Help


Copy‑and‑paste record examples

Replace yourdomain.com with your domain. Keep TTL default if unsure.

MX (choose one approach):

  • Single (recommended)

    • Name/Host: @

    • Type: MX

    • Priority: 1

    • Destination: smtp.google.com Google Help

  • Legacy set (supported)

    • ASPMX.L.GOOGLE.COM (priority 1)

    • ALT1.ASPMX.L.GOOGLE.COM (priority 5)

    • ALT2.ASPMX.L.GOOGLE.COM (priority 5)

    • ALT3.ASPMX.L.GOOGLE.COM (priority 10)

    • ALT4.ASPMX.L.GOOGLE.COM (priority 10) cPanel Support

SPF (TXT):

  • Host: @

  • Value: v=spf1 include:_spf.google.com ~all (add other senders as needed; one SPF per host) Google Help

DKIM (TXT):

  • Host: google._domainkey

  • Value: v=DKIM1; k=rsa; p=… (paste from Google Admin → Authenticate email) Google Help

DMARC (TXT):

  • Host: _dmarc

  • Value (starter): v=DMARC1; p=none; rua=mailto:[email protected]; adkim=s; aspf=s Google Help

Custom Gmail URL (CNAME):


Activate & test

  1. In Google Admin, Activate Gmail for the domain if prompted. Google Help

  2. Wait for DNS to propagate (can take up to 72 hours). Google Help

  3. Use Google’s Admin Toolbox Dig to confirm MX/SPF/DKIM are live, then send/receive a few messages to test. Google Help


Troubleshooting & tips

  • Email Routing still Local? Re‑set Email Routing → Remote Mail Exchanger in cPanel so the server never tries to keep mail locally. cPanel & WHM Documentation

  • Multiple SPF records break SPF. Merge everything into one TXT that starts with v=spf1. Google Help

  • Don’t mix providers’ MX. Remove any non‑Google MX entries; keep either the single smtp.google.com record or the legacy five, not both. Google Help

  • TTL formats vary. If a provider asks for seconds, 3600 (1 hour) is a sensible default; Google’s help suggests using your domain host’s default. Google Help

  • DKIM key size. Use 2048‑bit if supported; publish the TXT at google._domainkey. After DNS propagates, click Start authentication in Admin. Google Help

  • Moving from legacy to single MX? You don’t have to change if mail works; both are supported. If you do change, do it in a maintenance window and keep SPF/DKIM/DMARC as‑is. Google Help


FAQ

Is “G Suite” the same as Google Workspace?
Yes—Google rebranded G Suite to Google Workspace. The terminology in this article covers both so it’s easier to find. Google Workspace

How long until email works?
MX changes can take up to 72 hours to propagate globally. You may see partial delivery earlier. Google Help

Can I keep cPanel’s own DKIM/SPF toggles on?
When your mail is handled by Google, rely on the DNS TXT records you publish for SPF/DKIM. cPanel’s “Email Deliverability” screen is for the server’s own mail; it won’t generate Google’s DKIM for you. cPanel & WHM Documentation


Need a quick checklist?

Did this answer your question?