Sunday, August 3, 2008

Setting up the DNS

Trying to figure out DNS has given me some problems. Unfortunately some bugs exist in setting up the GAE so I will try and outline what I have found here.

You are able to register a domain with google for $10 a year, this is a great bargain as it includes privacy. At this stage it does not look as though they are allowing domain transfers.

1. Firstly you will have to have your domain name registered with google apps.
http://www.google.com/a/ - sign up here
Once you have signed up you can log in to your like this;
http://www.google.com/a/yourdomain.com

2. You will need to figure out the numbers needed for the A records from google. I have found them at this location: http://www.google.com/support/a/bin/answer.py?answer=91080&hl=en
The numbers when I last checked are;
  • 216.239.32.21
  • 216.239.34.21
  • 216.239.36.21
  • 216.239.38.21
3. Log in to your domain host e.g. GoDaddy (Which I have used in this example).
From the domain manager, select the domain you wish to use. The select "Total DNS control and MX records" (If this is missing you will need to make sure you have set godaddy as your dns host)
In the boxes you will need to delete all the current A records then add the following under A(host);
Host: @ Points to: 216.239.32.21
Host: @ Points to: 216.239.34.21
Host: @ Points to: 216.239.36.21
Host: @ Points to: 216.239.38.21

While you are there you should set up the rest of your dns.
Under CNAME (aliases);
Host: www Points to: ghs.google.com
(You can add whatever sub domains here that you wish to use)

If you are using google for your email double check the MX records while you are there.
Priority: 1 Host: @ Goes to:aspmx.l.google.com
Priority: 5 Host: @ Goes to:alt1.aspmx.l.google.com
Priority: 5 Host: @ Goes to:alt2.aspmx.l.google.com
Priority: 10 Host: @ Goes to:aspmx2.googlemail.com
Priority: 10 Host: @ Goes to:aspmx3.googlemail.com

This should be all you need to do on the DNS side of things.

4. Go to the Google application engine and make sure you do things in the right order;
From the dashboard select;
Add More Services, then type in the name of your google app e.g. myapp
Select the tick in the agree box, then type in the name of your web address;
Type in: temp.yourdomain.com DO NOT put: yourdomain.com
The press "continue to set up URL"

go back to the dashboard now add a new service yourdomain.com to yourapp
then do it again for www.yourdomain.com.

Once you have done this you can delete temp.yourdomain.com from your application.

5. Wait.
In theory this should work and you will never have to touch it again.
However check that it works sometime later (24 to 48 hours)
make sure you check both www.yourdomain.com and yourdomain.com

With one of my apps www.domain.com didn't work so I had to delete the www from myapp then add it again.

Hopefully that should get you around the two main bugs which I found, if you have any further questions or comments please feel free to ask on the google apps group.