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.

5 comments:

Unknown said...

Hi WallyD,

Gooogle Apps says "Invalid domain" when I tried to enter naked domain http://domain.com

So it doesn't seem to be possible to setup the url as you said.

Just checkout the screenshot I posted
http://www.flickr.com/photos/akashxavier/2730109069/

This is in reply to this thread,
http://groups.google.co.in/group/google-appengine/browse_thread/thread/87de5817c3fd7cce?hl=en#

I posted there as alphaLouis :)

--
Akash

Unknown said...

Shane,

Jake found the solution and posted it in the same thread.

http://groups.google.co.in/group/google-appengine/browse_thread/thread/87de5817c3fd7cce?hl=en#

Your above tips and tricks are right. But the user's Google Apps version should be set to 'current'.
This can be done to 'Domain Settings' and then selecting 'General' in the sub-menu that shows up.

Then scroll down the form and look for a field called 'Control Panel'. Choose 'current version'.

That's it! Then follow your tutorial in the blog post and it works fine!

Anonymous said...

Hi, think this might be a factor...

----------
I'd like to map my app to http://myurl.com (also known as a naked domain).

Due to recent changes, Google App Engine no longer supports mapping your app to a naked domain. If your domain registrar supports URL redirects, you can redirect from http://yourdomain.com to your app, which can be served from domains like http://www.yourdomain.com or http://appid.yourdomain.com.
-------

Unknown said...

Myappscompany.com

Sandeep Gupta said...

Really very helpful... Thanks :)