Wednesday, June 04, 2008

Configuring Google Apps to host your Domain for free

I've recently setup a new domain name for a new S/W Development Consulting company I'm creating called Mastered Software (MasteredSoftware.com). I was planning on creating my new website using C# .NET and Visual Studio .NET 2005, because that is the platform I'm most comfortable with, however, finding affordable Windows hosting that supports the .NET framework is not easy, the cheapest I could find was $10 a month if you bought 2 years at a time, which isn't much compared to other hosting solutions, but for a small business even this adds up quickly.

I was also recently checking out Google's App Engine and Google Apps for your domain services, and what's cool is that you can host your domain and even email through the google apps for your domain service! The best part is, for small companies that don't need lots of storage and features it's free!

Here are the steps I took to have my domain hosted by google:
  1. Start by signing up for Google Apps for your Domain at: http://www.google.com/a/
  2. You will be prompted to verify ownership of your domain during setup, there are a couple of options to do the verification, including adding a special CNAME record in your domain name registrar's system to point to google.com, this is the method I used for verification because it was the most straightforward. While you are there, you may want to add additional CNAME records for your domain which point to ghs.google.com (i.e. masteredsoftware.com and www.masteredsoftware.com).
  3. Enable the applications you want such as email, calendar, etc... For creating the content for my main site I choose to use the Google Pages application because it's very easy, configure the web address for google pages to point to www. for my site it is www.masteredsoftware.com click on the "Change URL" link from the Web Page settings screen to update the web address. Create a basic home page for your site through google pages so you have something to look at when you go to your domain, don't forget to publish your changes so they are live on the site.
  4. At this point you should be able to browse to the "www" version of your site (if you setup the CNAME records in step2 for www.yourdomain.com to point to ghs.google.com).
  5. Unfortunately there is no way at the moment to have the "naked" domain version of your site point to your google pages site ,unless perhaps you have your domain hosted through google domain hosting, I don't know because I haven't tried that service. You maybe able to setup a forward or redirection from the naked domain to the www version in your hosting provider's DNS settings, with my hosting provider I was not able to do that and have some more of the advanced features for my domain such as redirecting the MX records to google. Fortunately you can host your naked domain using the google apps framework.
  6. Once you have signed up for the google apps framework, add your naked domain (in my case masteredsoftware.com) under the google apps framework options.
  7. Follow the instructions on this page: Uploading your application to upload your files to the google app engine service.
  8. Here is the code for my masteredsoftware.py file:
    print "Status: 302 Moved"
    print "Location: http://www.masteredsoftware.com/"
    print ""
  9. Also setup your app.yaml file pointing to the main script file:
    application: masteredsoftware
    version: 1
    runtime: python
    api_version: 1

    handlers:
    - url: /.*
    script: masteredsoftware.py
  10. If everything worked out the code files above should forward your naked domain requests to your www.yourdomain.com version.
  11. ...Finally you might want to add google analytics to your pages site so that you can track visitors. Just click on the area you want your analytics code, click the edit html link (on the bottom right of the google pages page), surround the analytics code with div tags and save and publish your changes.
  12. Now you can play with some of the other cool features that Google apps for your domain allows (such as gmail hosting, etc...)
  13. Have Fun domain hosting!

1 comments:

Ripbud said...

In other words you don't want to pay me...
sigh...
So sad....