cPanel – Setup Google Apps MX, CNAME and SPF records

Written by Shai Ben-Naphtali Friday, 15 January 2010

UPDATE: new GoogleApps tool in cPanel. Please refer to the articles below.

How to Configure GoogleApps for Mail Using cPanel
How to Configure GoogleApps for Documents Using cPanel
How to Configure GoogleApps for Calendar Using cPanel

Related documents:

  1. DNP (DotNetPanel) – Setup Google Apps MX, CNAME and SPF records

Since Google Apps is one of the best (if not the best) email services out there, here is how you can setup your domain, which you have its DNS managed by Arvixe, to point to Google.

This blog post presumes you’ve already setup your Google Apps account and that you are just now doing the finishing touches (ie. final DNS settings to have Google handle your emails). If you’ve setup your Google Apps account correctly, this final step will put the finishing touch and allow Google to handle all your emails needs.

For this to be done, you’ll need to setup three DNS records:

  1. MX records, thus telling the world, who handles email for your domain (ie. Google).
  2. CNAME record, so that if you type mail.yourdomain.com (replace yourdomain with your own domain name – like mail.shai-arvixe.com), it points to Google Apps login page.
  3. SPF record to tell the world that Google is allowed to handle emails for your domain (this helps other mail servers know that Google is allowed and thus, help prevent filtering emails from you as spam).

Note: the links above point to Google’s own help articles, respectively.

MX Records:

  • In your control panel, click on MX Entry from the Mail section (picture 1)

    picture 1

    picture 1

  • Click Editto set the default record to a higher value (higher means lower priority), we don’t want to delete it, since we don’t want to interrupt current mail connectivity if such exists (picture 2)

    picture 2

    picture 2

  • Change current value of o (zero) to 50 (fifty) and click Edit(picture 3)

    picture 3

    picture 3

  • Now go to Google’s MX Records page and begin entering new records, one at a time (picture 4)
  • Note: You don’t need the . (period) at the end of each record. If you do put one in, you’ll get an error message “Destination must be a FQDN (fully-qualified domain name)”(picture 5)
    picture 4

    picture 4

    picture 5

    picture 5

  • At the end, you should have something like (picture 6)

    picture 6

    picture 6

CNAME Record:

  • In your control panel, click on Simple DNS Zone Editor from the Domainssection (picture 1)
    picture 1
    picture 1
  • Since mail CNAME is already a default one, you can either pick a new CNAME or use the Advanced DNS Zone Editor to change the default mail A record to your mail Google Apps CNAME.
    If you don’t require that, you can go ahead and put in a new CNAME like mail2.yourdomain.com (picture 2)

    picture 2

    picture 2

  • You can now also add docs, sites and calendarCNAMEs as well (picture 3)

    picture 3

    picture 3

SPF Record:

  • Google recommends that you add the following SPF record to your DNS zone. In cPanel, users can do this using the Advanced DNS Zone Editor to have this record added for you (picture 1)
    v=spf1 include:aspmx.googlemail.com ~all

End result (after MX, CNAME and SPF):

After all said and done, you can always ask Arvixe’s support to review your dns zone and make sure you did it correctly, this is what we should see, if you did it all right (picture 1)

picture 1

picture 1



26 Comments

  1. DNP (DotNetPanel) – Setup Google Apps MX, CNAME and SPF records | Arvixe Blog   |  Saturday, 16 January 2010 at 4:17 am

    [...] cPanel – Setup Google Apps MX, CNAME and SPF records [...]

  2. Daryl Lau   |  Sunday, 11 July 2010 at 3:24 am

    Just wanted to drop a Thank You note to you for posting this guide which helped me a ton setting up my Google Apps on my domain.

    Cheers mate!

  3. HipResurfaceAdmin   |  Thursday, 16 September 2010 at 10:35 am

    Thanks for ur post. I will follow the same to setup google apps for our CPanel account.

  4. Shai Ben-Naphtali   |  Thursday, 23 September 2010 at 8:47 pm

    @Daryl @HipResurfaceAdmin You’re both welcome :)

  5. Shovan   |  Tuesday, 12 October 2010 at 3:34 pm

    Amazing and clear.. thanks for the tutorial.

    I am waiting for the verification from google

    Cheers,
    Shovan

  6. Venkat   |  Thursday, 02 December 2010 at 4:57 am

    Thank you for clear Tutorial..

    Had no trouble!!

    Cheers
    Venkat

  7. Shai Ben-Naphtali   |  Tuesday, 07 December 2010 at 8:27 pm

    @Shovan @Venkat ; You’re both welcome :)

  8. Oskar Pearson   |  Thursday, 09 December 2010 at 3:18 pm

    http://www.google.com/support/a/bin/answer.py?hl=en&answer=178723 indicates that their recommended SPF record has changed away from aspmx.googlemail.com

    It is now “v=spf1 include:_spf.google.com ~all” instead.

    Oskar

  9. W.C Zhu   |  Monday, 17 January 2011 at 3:49 am

    Good tutorial! I thought I can only add Google Apps in my domain register…….. It’ll be very convenient to add it here :)
    Happy~~~

  10. James Smeaton   |  Monday, 17 January 2011 at 4:53 pm

    Sweet guide, thanks for getting it out, after like a solid 30 min of wading through crap, I discovered this and it was perfect, perhaps add in a big red highlight, REMOVE PERIOD at end if you ever get a FQDN error. Just a simple period, heheh, can cause a lot of head aches. Thanks!

  11. Shivam Sharma   |  Sunday, 23 January 2011 at 2:35 am

    Many thanks! It doesn’t get easier than this.. thanks again!

    Cheers,
    Shivam

  12. Carlos Goytia   |  Wednesday, 13 April 2011 at 11:05 pm

    Awesome Guide!! Easy follow Steps!! Waiting on the verification!!

  13. Jerry Dun   |  Tuesday, 24 May 2011 at 5:02 am

    This is perfect, thank you!

  14. Boris   |  Thursday, 28 July 2011 at 6:37 am

    Thanks a lot man!!!!

  15. rudraksha   |  Sunday, 07 August 2011 at 5:00 am

    Thank you. this document has been very useful for me to add cname record and verifying that back.

  16. Kareem   |  Friday, 19 August 2011 at 7:22 am

    Clear, Concise and very helpful – Thanks

  17. Alex   |  Monday, 12 September 2011 at 9:49 pm

    Brilliant document! It’s not often you come by something so helpful all in one site. Thanks!

  18. VK   |  Saturday, 24 September 2011 at 12:45 pm

    I followed above steps in my website control panel but I am getting following error.

    404. That’s an error.

    The requested URL / was not found on this server. That’s all we know

    Please help!

  19. Ajay   |  Saturday, 19 November 2011 at 10:05 am

    Excellent. Thanks a ton for the guide.

  20. Dean   |  Thursday, 08 December 2011 at 6:11 am

    Mate, thanks a MILLION, you should do this for a living lol
    That was hands down the easiest tutorial I have ever been through and I have avoided this for WEEKS simply because looking at it caused the other half of my hair to get stage fright :-)

    All the best

  21. andrie   |  Wednesday, 18 January 2012 at 10:30 pm

    *Bookmarked

    That’s a neat steps you wrote there. I can’t even find those in Google’s or cPanel’s website.
    I’m familiar with cPanel’s basic features, but those settings are not features I had ever use before. I just moved to a new company which used Google apps for email, and the company decided to move the domain registrar so I have to do the settings.
    You saved my life. Thanks!

  22. Senthil kumar   |  Wednesday, 22 February 2012 at 12:23 am

    Hi,
    I want to use both google apps and own mail server at same time is it possible. because i have some mail id @ google other mail ids are in my own server is it possible ?

  23. Steven Mahoney   |  Sunday, 26 February 2012 at 5:57 pm

    This is the most clear and detail explanation ever! I struggled for days to find a right tutorial. And here it is!!!

    Thanks for taking your time! it was not wasted for nothing!

    Steven

  24. Suresh   |  Friday, 09 March 2012 at 9:02 am

    I am using google apps, i am getting mails form all other ids, but when i try to send mail from my contact form in page
    http://www.tallyworld.org/contactus.htm , no mail is getting delivered to my mail, before using of google apps, that contact form is worked fine

    Please give me solution
    Thanking you

  25. Unni   |  Thursday, 28 June 2012 at 8:40 am

    Dear friend, thanks for this awesome tutorial ,especially for the picture 4 and 5 . while filling MX entry i got the same error. first i thought i have made some mistake but your tut explained all

    thanks man

  26. Paul Kerrison   |  Sunday, 08 July 2012 at 9:30 am

    Thanks for this guide – I’ve just used it to set up mail on my site….very handy indeed…

Leave a Reply






2 × three =