A recipe for setting up your email address at your custom domain for free. Using Gmail, Cloudflare, Mailgun and optionally Mailchimp.
Mailgun
Create an account then verify it. You need to add a credit card to get all of the features, but it’s still free for the first 10,000 emails a month.
Add domain
Go to Domains:
- Click “Add Domain” button
- Under “Domain Name” enter your domain (ex:
example.com
) Ignore the message “We highly recommend using a subdomain”. You should not include a subdomain if you want to receive email too. - Submit the form
Forward email to Gmail
Go to Routes:
- Click “Create Route” button
- Set “Expression Type” to “Match Recipient”
- Set “Recipient” to your email address (ex:
[email protected]
) - Under “Actions” check “Forward” and add your Gmail address (ex:
[email protected]
) - Submit the form
Cloudflare
Get config from Mailgun
In Mailgun go to your domain (ex: https://app.mailgun.com/app/domains/example.com
). Keep this page open as you will be copying and pasting values from here to Cloudflare.
Configure DNS
In Cloudflare go to the DNS section.
- Add the 2 TXT records using their supplied values. (ex:
v=spf1 include:mailgun.org ~all
andk=rsa
) - Add a CNAME record with “email” as the “Name” and
mailgun.org
as the “Value”. - Uncheck the cloud icon for the CNAME.
- Add an MX record with your domain as the “Name” and “mxa.mailgun.org” as the “Value” and a “Priority” of “10”.
- Add an MX record with your domain as the “Name” and “mxb.mailgun.org” as the “Value” and a “Priority” of “10”.
In Mailgun click the “Check DNS Records Now” button to confirm settings are correct.
Gmail
Go to Gmail:
- Click the “Cog” icon and go to Settings
- Click the “Accounts and Import” tab.
- Under “Send mail as” click “Add another email address”:
- Set “Name” to your personal or company name
- Set “Email address” to your email address (ex:
[email protected]
) - Ensure “Treat as an alias” is checked
- Click “Next Step” button
- Fill in the form with settings from you domains “Domain Information” at Mailgun.
- Gmail’s “SMTP Server” equals Mailgun’s “SMTP Hostname”
- Gmail’s “Username” equals Mailgun’s “Default SMTP Login”
- Gmail’s “Password” equals Mailgun’s “Default Password”
- Ensure “Secured connection using TLS” is checked
- Click “Add Account” button
- You should receive a message like: “Congratulations, we successfully located your other server and verified your credentials.”
- Verify your new email address in Gmail
Mailchimp (optional)
In Mailchimp add your domain at Account -> Domains:
- Click “Verify A Domain”
- Under “Email Address” enter you email address
- Go to Gmail and click the verification link
In Cloudflare add these records:
- Add a CNAME record with
k1._domainkey.example.com
for “Name” anddkim.mcsv.net
for “Value”. - Add a TXT record with
example.com
for “Name” andv=spf1 include:servers.mcsv.net ?all
for “Value”.
In Mailchimp at Account -> Domains:
- Click “Authenticate” button to the right of your domain.