Creating MX records for Google Apps

A common way of handling email for your domain is to use Google Apps.

However, there can be some confusion in setting up the Mail Exchange (MX) records. Let's go through the procedure now.

Real Life

There is no way of using a 'dummy' domain for this so I used one of my own domains (

The entire process took around 5 minutes from creating a Google Apps account, verifying the domain and then setting up the correct MX Records.

I am not going to go through the whole Google Apps account creation. Suffice to say that you need to go to the Google Apps site and click the 'Get Started' link.


When you select a domain to use with Google Apps, you will need to have it verified so Google knows the domain is actually yours.

There are two ways to do this (full instructions are on the Google site): One is to change the CNAME record and the other way, which I chose, is to create a certain html file with specific content (again, Google shows what to do).

My point is that if you choose the latter verification method, the domain will need to be live. In other words, Google will navigate to your domain and verify the presence of the specified html file.

So if you don't have a working website then you need to sort that out first.


OK. Hopefully you have your Google Apps account set up and you are ready to configure your MX records.

In all, there are five MX records to create.

Perhaps obviously, but each one needs to entered precisely as directed by Google, including having the Auxiliary Information exactly as specified.

DNS Panel

Log into the SliceManager and navigate to the DNS Panel:

As you can see, I have my domain ( set up and I've created the 'base 5' records (see the Creating DNS article for information on base domain records).

Click 'records' and then 'new record'.

First MX Record

As previously mentioned, there are 5 MX records to create.

Let's start with the first one by selecting 'MX' from the type dropdown box and entering the first record:

In the fields I have:



Auxiliary Info: 1

Note that period '.' at the end of the records for Name and Data.

Remaining MX Records

Now create the remaining 4 records with the following information:

Don't forget to set the Auxiliary Info to the numbers shown above.


Once you have all 5 MX records your domain's MX records should look something like this (I removed the A and NS records for clarity):

As I say, don't be confused, I removed all the other records to show the 5 MX records more clearly.


As normal, if you have created any records, have a quick check to see if they are correct using the dig command:

dig MX

The question and answer part of the output were as follows:

;                      IN      MX

;; ANSWER SECTION:               86400   IN      MX      1 ASPMX.L.GOOGLE.COM.               86400   IN      MX      5 ALT1.ASPMX.L.GOOGLE.COM.               86400   IN      MX      5 ALT2.ASPMX.L.GOOGLE.COM.               86400   IN      MX      10 ASPMX2.GOOGLEMAIL.COM.               86400   IN      MX      10 ASPMX3.GOOGLEMAIL.COM.

Well, that looks spot on.

Final Test

To test the settings, log into your Google Apps email account and send an email to another address (your personal email address for example).

Once you receive that email (which shows that you can send emails!), reply to it.

Check your Google Apps email and there should be the reply you just sent.

All seems to be working and I can now send and receive emails using my domain and Google Apps.



Using Google Apps is a nice way of using your domain for emails without the added hassle of running your own mail server.

Once you have verified your domain with Google, setting up the MX records is very easy.


Article Comments:

Joe commented Tue Nov 20 18:05:09 UTC 2007:

This is no big deal but under "Remaining MX Records" you have "" instead of ""

PickledOnion commented Tue Nov 20 18:07:11 UTC 2007:


Thanks for the note. Have adjusted the article as needed :)


James commented Sun Dec 02 19:57:00 UTC 2007:

If you are using Gutsy, you may first have to install dnsutils to use dig:

sudo aptitude install dnsutils

MKA commented Wed Jan 02 19:41:00 UTC 2008:

I know you decided to verify your account using the uploaded HTML file, but it would be really helpful to know how use the slice manager to add a CNAME record as per google's instructions; they are somewhat, uhm, brief.

Thanks for the great tutorials. So far it's been a breeze working with my new slice. New, as in a couple of hours old... ;-)

pimpmaster commented Wed Jan 16 11:11:26 UTC 2008:

I got my google mail working great with this tutorial, but I am getting a warning from google that my record values are set incorrectly. They say I need to set it up like so:


PickledOnion commented Wed Jan 16 14:46:18 UTC 2008:


It's possible they have changed their requirements.

I will take a look and update the article as necessary - thanks for the heads up.


John Barker commented Fri Feb 08 05:37:03 UTC 2008:

Have you taken a look at this? I just recently moved to Slicehost from (mt) and now can't get my mail to work properly.

PickledOnion commented Fri Feb 08 12:30:10 UTC 2008:

Hi John,

I haven't changed the article but I set up a domain using these instructions yesterday with no issue.

Mail is working perfectly with the domain.


Wolfram Arnold commented Sun Feb 10 22:08:25 UTC 2008:

Great article. That helped a lot and there were no hiccups. I really appreciate the quality of the tutorial and instructional articles on here.

Arun Pattnaik commented Fri Mar 07 05:14:57 UTC 2008:

Hey, Google apps now requires 7 MX entries to be set up. :)

Timothy Kim commented Wed Mar 19 18:00:27 UTC 2008:

Here's what google had to say about MX records. Hope this helps!

Austin Burbridge commented Sat Mar 29 04:15:04 UTC 2008:

Google Apps' MX records instructions finish with this intriguing suggestion:

Change the SPF record to fight SPAM (optional) You may define the SPF record to authorize only certain IP addresses to send email for your domain. This will prevent spammers from sending unauthorized email under a forged address from your domain.

How to accomplish this?

And, what is an SPF record, anyway?

Bojan commented Tue Apr 08 13:04:25 UTC 2008:

I Have a slice host and set up Google Aps enter MX records, sent Test mail from google aps it works, though I need to know how to set up mu slice so I can send emails from PHP. Is there anyting that needs to be done on slice server so that mails don't get bounced ?

alan commented Tue May 13 14:21:34 UTC 2008:

Hi. You think it will be feasible to include an option that will allow us to edit multiple dns entries all at the same time? Eg a big open field for 'advanced' users? Doing this one by one could be quite laborious, specially if one has many domains to migrate to Slicehost. At least, that's the plan...

kelly wilhelm commented Wed May 28 17:52:00 UTC 2008:

I made the changes and waited 48 hours, at which time google said they were wrong. i went back into my yahoo domain controls and looked. the trailing dot was removed from each entry. It will not let me enter the new info with a trailing dot. is this a function of my webhost, who is not yahoo but rather citymax?

PickledOnion commented Wed May 28 17:58:30 UTC 2008:


We have an API which would reduce the manual labour of adding domains via the SliceManager.


I am sorry but I have no idea how citymax handles those sort of things - you would have to speak to them. I am not sure of the mix of yahoo, citymax, google apps and Slicehost.....


Eddie commented Thu May 29 17:09:25 UTC 2008:

Hey folks, Is it possible to have e-mails that are sent to sent to

Say I had a domain name called maindomainname, and this domain had another domain name (pointingdomainname) pointing to it (set up through the serveralias option in maindomainname's apache config file). Is there a way of making e-mails sent to anyaddress@pointingdomainname get delivered to

spark commented Mon Jun 02 07:01:13 UTC 2008:


I am having a problem similar to kelly wilhelm,in Yahoo Domains, when I make the MX record changes for google apps. "the trailing dot was removed from each entry. It will not let me enter the new info with a trailing dot."

My domain name is on Yahoo Domains.

Anyone found a solution to this. I posted a email to yahoo but no reply yet from them...nearly a week over.

Chris Cummer commented Fri Jun 13 21:11:44 UTC 2008:

Amazingly helpful and worked like a charm - thanks for this PickledOnion.

Si commented Thu Jun 19 21:33:56 UTC 2008:

Quick and helpful guide. Thumbs up from a fellow Brit!

Alex Sharp commented Mon Jul 07 20:25:55 UTC 2008:

As usual, top notch article. Another life saver. Thanks again.

Mike D. commented Tue Jul 15 17:20:25 UTC 2008:

Helpful hint for entering multiple records: after entering a new record, just click your browser's back button -- you can re-edit the form (usually one small change) and resubmit, and a new record is created.

Rinse, repeat.

Brian Edwards commented Sat Jul 19 05:28:11 UTC 2008:

is it possible to set my root domain name ( to a CNAME that points to google app engine, and set up MX records. Right now it seems like the CNAME overrides the MX records.

dig mx


Matías Insaurralde commented Mon Sep 08 02:56:45 UTC 2008:

Great guide. Thanks!

Bojan commented Thu Oct 02 23:20:24 UTC 2008:

If I have more than 10 domains is it better to use google apps for all or is it better to have one mail server for all of them and use one common domain name for mails. eg all domains are automotive-like

Fernando Correia commented Mon Nov 03 23:05:32 UTC 2008:

For me, too, Google lists different records as needed:


Leo Richard Comerford commented Sun Nov 30 13:14:45 UTC 2008:

It would be good to have a similar article explaining how to set up the SRV records described at , which are necessary to allow Google Talk accounts for the domain to federate with non-Google Jabber servers.

denny commented Thu Feb 12 22:00:42 UTC 2009:

Thanks alot for the tutoria, it's really work and easy !!!

Mohammad Elkersh commented Mon Apr 06 10:22:31 UTC 2009:

what value i should use for reverse DNS if i am using google apps

Billee D. commented Sun Apr 26 15:50:00 UTC 2009:

Once again, thank you Mr. Onion! Detailed, easy-to-understand instructions that work like a charm. Awesome job. :-)

Vinod commented Wed May 27 13:53:32 UTC 2009:

Instead of Dig command, you can use the<> to check the records.

server support commented Wed Jun 17 10:15:44 UTC 2009:

  1. Log in to your account at
    1. If it's not already selected, click the Administration tab.
    2. Click Domains. The Domain Overview page appears.
    3. Select the checkbox next to the domain that you will be using with Google Apps.
    4. From the DNS menu, select Edit DNS Settings.
    5. Under Advanced DNS Settings, select the Other mail server radio button.
    6. Enter the following information:
    7. Click OK.

Congratulations! Your MX records are now configured to point to Google. Keep in mind that changes to MX records may take up to 48 hours to take effect.

Chris commented Wed Sep 02 03:40:23 UTC 2009:

Thanks for this! I had been trying to figure out which field was for which piece of data.

Matthew commented Mon Mar 08 14:07:46 UTC 2010:

Saved my life...

vvan commented Thu May 20 11:44:43 UTC 2010:


Great tutorial, really appreciated. Just a quicky;

I am getting the following error when I try to send an email from my rails application

Recipient address rejected: User unknown in local recipient table

Any help would be much appreciated.

Thanks in Advance.

Assana commented Wed Jun 16 01:33:46 UTC 2010:

Excellent tutorial! Worked flawlessly. Thank you! :)

Events in Pittsburgh commented Mon Feb 07 09:54:41 UTC 2011:

Helpful hint for entering multiple records: after entering a new record, just click your browser's back button -- you can re-edit the form (usually one small change) and resubmit, and a new record is created

Go ped commented Tue Feb 15 13:30:50 UTC 2011:

i found it too much better than others and it is very informative and you Instead of Dig command, you can use the<> to check the records...

MAZAR commented Mon Apr 25 21:52:29 UTC 2011:

You know when you activate email, there is a drop-down box that says different domain services. Well, there is alot listed in there but not That one is a domain service that is free. But there is no pacific instructions for For Example: for GoDaddy , there is instructions that say "First sign in to your account on GoDaddy". then it says how to activate it and stuff and shows what to put in the host place and the Priority place. Well, there is no instructions for Can you guys create one for You can go to their website and look through it and maybe create pacific

arthur commented Tue Oct 25 15:38:58 UTC 2011:

i also read it on and its good

mansfield commented Tue Dec 06 15:49:25 UTC 2011:

I couldn't find on facebook though, got a link please?

Japan Film commented Mon Jul 14 14:16:42 UTC 2014:

Thank you a lot for sharing this with all people you actually realize what you're speaking approximately! Bookmarked. Please additionally consult with my site =). We can have a link change arrangement among us

Want to comment?

(not made public)


(use plain text or Markdown syntax)