Google mail with your own domain
Setting up Google Mail (Gmail) with your own domain is a process called "Domain Keys Identified Mail" (DKIM) and "Sender Policy Framework" (SPF). This allows you to use your own domain name (e.g. [yourname]@yourdomain.com) instead of a Gmail address (e.g. [yourname]@gmail.com). Here's a step-by-step guide to set it up:
Prerequisites:
- You have a domain name registered with a registrar (e.g. GoDaddy, Namecheap, etc.).
- You have a Google Workspace (formerly G Suite) account.
- You have a domain name server (DNS) provider (e.g. Google Cloud DNS, Cloudflare, etc.).
Step 1: Create a TXT record
- Log in to your DNS provider's dashboard.
- Create a new TXT record with the following settings:
- Host:
_domainkey
(or_dmarc
if your provider requires it) - Value:
k=rsa; p=<your_public_key>
(you'll generate this in the next step) - TTL: 3600 (or your provider's recommended value)
- Host:
- Save the changes.
Step 2: Generate a public key
- Log in to your Google Workspace account.
- Go to the "Settings" icon (gear icon) > "See all settings" > "Advanced" > "Security" > "DKIM".
- Click on "Generate a new key" and follow the instructions.
- Copy the public key.
Step 3: Create a CNAME record
- Log in to your DNS provider's dashboard.
- Create a new CNAME record with the following settings:
- Host:
smtp.google.com
- Value:
ghs.google.com
(orsmtp-relay.gmail.com
for Gmail) - TTL: 3600 (or your provider's recommended value)
- Host:
- Save the changes.
Step 4: Verify your domain
- Log in to your Google Workspace account.
- Go to the "Settings" icon (gear icon) > "See all settings" > "Accounts" > "Domain".
- Click on "Verify" next to your domain name.
- Follow the instructions to verify your domain ownership.
Step 5: Set up SPF
- Log in to your DNS provider's dashboard.
- Create a new TXT record with the following settings:
- Host:
@
(oryourdomain.com
) - Value:
v=spf1 include:_spf.google.com ~all
(or your provider's recommended value) - TTL: 3600 (or your provider's recommended value)
- Host:
- Save the changes.
Step 6: Test your setup
- Send an email from your new domain (e.g. [yourname]@yourdomain.com) to a test email address.
- Check the email headers for the following:
Authentication-Results
header with adkim
andspf
result.Received-SPF
header with apass
result.
- If everything looks good, your setup is complete!
Note: It may take some time for the changes to propagate globally, so be patient and try sending another test email after a few hours.