Showing posts with label cname. Show all posts
Showing posts with label cname. Show all posts

07 May 2012

Setting up a custom domain for your Google App Engine (GAE) app

Setting up a Google App Engine application with a custom domain is a pain in the ass. Its overly complicated and takes much too long. Still, i did it and made it work, so I figured I’d write it down.

  1. Sign into GAE and in the list of my applications, click on your application. You should see the GAE dashboard. Somewhere down the list on the left you should see Application Settings. Click on that. Scroll way down and somewhere under “Domain Setup” you’ll see a button “Add Domain”. Now open a new window or something because we’ll need to come back to this tab later. This is where you’ll need to signup for Google Apps.

  2. Google Apps. I’m not 100% sure exactly how to define Google Apps, but I think it’s best described as a host of business services all under one roof. It’s basically a central place for businesses to utilise online tools to work and collaborate. My words, not Googles! Anyway, you need an account to make this work, it is free so go ahead and sign up and answer the endless questions. Get everything sorted and when its all up and running you can move on to adding the domain you bought to your Google Apps account.

  3. Register your domain. Next you need to add your domain to Google Apps, this means telling Google about the domain that you’ve already registered and proving you own it. Google is nice here, they have a few methods of doing this. The one I used is for Google to ask you to copy a verification code of sorts and add it to a special txt key on your domain. If you’re using goDaddy like I am, this is pretty straight forward. You just need to sign into your goDaddy domain manager and paste in the code. From there Google will verify the domain and add the domain to your account. You can also upload a special Google HTML file to your server, but that’s a lot of work!

  4. Update your DNS. Now we need to change our DNS to point to google. I use goDaddy and this was deceptively simple, basically just login to GoDaddy’s DNS manager and click edit zone for your domain name. You want to change the www attribute for your CNAME record. Change it to ghs.google.com and your done.

  5. Finally you can go back to your original tab from step 1 where you’re still in GAE and add “www” (not inverted commas) as the domain. This should magically link everything up and hey presto your domain should point to your gae app.

This is a much shorter, and helpful description, well done “Mark” who figured it out and helped me a lot: http://stackoverflow.com/questions/817809/how-to-use-google-app-engine-with-my-own-domain-not-subdomain

25 January 2012

Assigning your GoDaddy domain name to your Amazon S3 bucket

In the previous post we setup a static website using Amazon Web Services (AWS) S3 bucket storage. Now we’re going to assign the fancy new godaddy domain we just bought to that bucket.
You will need:
    - A GoDaddy Domain
    - An working S3 bucket hosting your website

1. Bucket Name
First and foremost in the last post we named our bucket whatever we want. In this post it’s crucially important we are very careful with what we name our bucket. Amazon gets the bucket name to use from the URL, so you’ll need to match your domain with your bucket name. For example if my domain was www.mygreatwebsite.com you would need to make sure your bucket was called www.mygreatwebsite.com So if you haven’t already done that, go ahead and create a new bucket. You can easily copy and paste your files across from your old bucket. Of course make sure it’s setup as a website all works with the S3 URL.

2. GoDaddy Domain Manager
First we need to open what GoDaddy call the zone manager, there may be better ways to find it but here’s how i get there. Open godaddy.com, hover the mouse over Domains and click “Domain Manager” and login. Hover over Tools and click “DNS Manager”. In the list of your domains click “Edit Zone” next to your domain. You’ll see a bunch of information here, but in short you’re looking under the CNAME heading for www. By default it’s value is @. You need to remove this at symbol and change it to: mygreatwebsite.com.s3-website-eu-west-1.amazonaws.com
Obviously replacing the url with the one for your S3 bucket. Especially the “eu-west” bit and the mygreatwebsite.com with yourgreatwebsite.com and save. This is where the name of your bucket we mentioned in step one becomes so important.

You may want to check you don’t have forwarding turned on. The first time I set this up I just used domain forwarding, which is a neat and easy to use feature, but it just creates an iframe for your site, which won’t help your SEO one little bit. That said, it is a very quick and simple to use feature of GoDaddys. You can turn domain forwarding on and off in the DSN manager using the forward button at the top.

If you own http://mysite.com and http://www.mysite.com then (I believe) you have to either setup two buckets one called mysite.com and one called www.mysite.com or of course you could forward one domain to the other.

That’s it, sit back and be patient, domain changes can take a few hours to process so go buy some donuts and cross your fingers. Hopefully that all worked like a dream.

I owe a lot to this guy, Aaron Blohowiak and his excellent blog entry: http://aaronblohowiak.com/using-amazon-s3-and-cloudfront-to-host-a-stat

and also this this one by Steve Liles:
http://steveliles.github.com/pointing_a_domain_name_to_an_amazon_s3_bucket.html