cPanel – Setup Google Apps MX, CNAME and SPF records

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. (If you’re not already using Arvixe web hosting, you can get a great deal here.)

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 (replace yourdomain with your own domain name – like, 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 (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 ~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

Tags: , , , , , , , | Posted under cPanel/Linux Hosting, Domain Names, Internet, Mail | RSS 2.0

27 Comments on cPanel – Setup Google Apps MX, CNAME and SPF records

  1. Pingback: DNP (DotNetPanel) – Setup Google Apps MX, CNAME and SPF records | Arvixe Blog

  2. Daryl Lau says:

    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. Thanks for ur post. I will follow the same to setup google apps for our CPanel account.

  4. @Daryl @HipResurfaceAdmin You’re both welcome 🙂

  5. Shovan says:

    Amazing and clear.. thanks for the tutorial.

    I am waiting for the verification from google


  6. Venkat says:

    Thank you for clear Tutorial..

    Had no trouble!!


  7. @Shovan @Venkat ; You’re both welcome 🙂

  8. indicates that their recommended SPF record has changed away from

    It is now “v=spf1 ~all” instead.


  9. W.C Zhu says:

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

  10. 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. Many thanks! It doesn’t get easier than this.. thanks again!


  12. Carlos Goytia says:

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

  13. Jerry Dun says:

    This is perfect, thank you!

  14. Boris says:

    Thanks a lot man!!!!

  15. rudraksha says:

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

  16. Kareem says:

    Clear, Concise and very helpful – Thanks

  17. Alex says:

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

  18. VK says:

    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 says:

    Excellent. Thanks a ton for the guide.

  20. Dean says:

    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 says:


    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. 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. 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!


  24. Suresh says:

    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 , 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 says:

    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. Thanks for this guide – I’ve just used it to set up mail on my site….very handy indeed…

  27. Chema says:


    I have a JSON parse error in step three, when I try to add the spf record with “v=spf1 ~all”.

    Anybody can help me?


Leave a Reply

Your email address will not be published. Required fields are marked *