How to Setup DNS for Google Apps Mail on CloudFlare
Are you using CloudFlare? It’s really easy to setup. At this point, let’s assume you have joined the rest of us powering our sites through CloudFlare. Well by now, your DNS has been taken over and you may want to setup Google Apps email. If so, here are instructions on how to setup your DNS entries to play nice together.
There are two types of property to configure / add to your DNS zone. Google Apps does a good job of walking you through this, and so does this CloudFlare knowledge base entry, but I find sometimes seeing it visually clears up any doubts. After all, we want to get it right the first time. So here’s what we’re going to add as instructed by Google Apps:
Firstly, to setup Google Apps email, you will need to enter a CNAME entry to you DNS zone:
Host Name/Alias: Your URL prefix Example: mail
Value/Destination: ghs.google.com
When you setup this entry, be sure to deactivate Cloud Flare from handling traffic on this entry. This means the cloud icon should be grayed out, not active (orange). There’s no need for CloudFlare to handle your mail as that’s not its purpose.
Next, Google Apps email requires that you add the following 5 MX entries to your DNS. These are necessary to ensure your email flows through to/from Google’s mail servers.
Priority | Mail server |
---|---|
1 | ASPMX.L.GOOGLE.COM |
5 | ALT1.ASPMX.L.GOOGLE.COM |
5 | ALT2.ASPMX.L.GOOGLE.COM |
10 | ASPMX2.GOOGLEMAIL.COM |
10 | ASPMX3.GOOGLEMAIL.COM |
If you did all that correctly, your CloudFlare DNS entries will look like this: