Friday, December 28, 2007

Taming Google Apps And Blogger To Work In Perfect Harmony

For the past few months I have been fiddling with Google Apps and Blogger to work in conjunction on a single "Custom Domain". When using both services, it is easy to run into bumps along the path to getting everything setup. Many of the bumps do not provide any debug info as to what is causing the problem. So, today I will outline some of my findings in regards to setting up Google Apps and Blogger (along with your DNS records) to work together and play nice. It is not a step by step guide, but merely an advisory of what I consider to be best practices (I know people will take issue with some of the solutions and tips contained within - feel free to add to the debate in the comments).

Taking The Plunge
Are you ready to disregard all the nay-sayers who will scoff at your naiveté in daring to rely on an in beta email service such as is GMail for your business or other critical needs? Are you ready to only incur the cost of domain registration (a paltry 10$ a year at most) and forgo the cost of web hosting and all of its ridiculous pricing schemes? Are you ready to abandon the web-host crashing Wordpress blogging service for a less feature rich and not so plug-in friendly Blogger blog? Are you ready to have all your services hosted on Google's mass army of servers?

If you are ready to take the plunge, do not just sign up for all the services in one fell swoop. Take it one step at a time, and in proper order, to navigate around all the hazards that crop up along the course.

One Foot In Front Of The Other
First, you will have to decide how you are going to use Google's array of services. We will assume you will want to take advantage of Google's GMail for domains, but what we really need to know is whether you will be using Blogger or Web Pages for your main content - what do you want visitors to see when they go to yourdomain.com or www.domain.com? Your blog (or your blog customized into a CMS) or your Google Web Pages?

For most content publishers or small site/business owners tired of editing HTML and PHP documents, using a blog as your main content management system is a million times more appealing than using Google's limited Web Pages application - but do not think Pages can't be put pages to use in conjunction with your blog.

If you are going to use Blogger as your main content manager, set up Blogger first. If you have already signed up for Google Apps (such as GMail for your domain) you will immediately run into a conflict with attempting to publish to a www subdomain (e.g. www.yourdomain.com) or even the primary domain. In addition, if you plan on using GMail for your domain (or are currently using the service) you need to be careful in how you publish your blog to avoid missing any email.

When initially setting up Blogger there will be two critical issues to be aware of:
  1. Using a primary domain as a CNAME alias will override MX records on many DNS hosts' name servers including GoDaddy.

    For example, if you setup Blogger to publish to yourdomain.com instead of www.yourdomain.com by creating a CNAME record for the alias yourdomain.com pointing to ghs.google.com, you will find that, even if you have all the correct MX records on file, an MX lookup will return the CNAME record for your primrary domain ... ghs.google.com.

    This will cause all email sent to all users at yourdomain.com to bounce and not be delivered.

    The solution is to publish to www.yourdomain.com and setup domain forwarding (301/302 redirects) for your primary domain to either www.yourdomain.com or yourblogname.blogspot.com.

  2. If you setup Google Apps before beginning to setup Blogger, you will get the lovely nonsensical error "There is all ready a blog hosted at this address" when attempting to publish to www.yourdomain.com. The reason being, that Google Apps Web Pages and the Start Page assume the rights to publish to the www subdomain.

    The solution is to change the subdomain to which Web Pages and Start publish to or to disable them entirely. Then you can publish to www.yourdomain.com without a hitch.
Take Two Steps Back
I have all ready addressed the most serious conflicts that can arise between Google Apps and Blogger, but can you even setup your domain name to work as a Custom Domain in Google's services? When you read CNAME and MX above, did you just think "huh?" and gloss over the terms?

The most important question you have to answer before migrating to Google Apps and Blogger (or even supplementing your current setup) is, "Do I have access to modify my DNS records?" If you do not know the answer to the question, start by contacting your hosting provider or your registrar to find out whether or not you have access to make DNS changes.

GoDaddy and Enom are two partners with Google that do allow access to DNS records for parked (meaning no web hosting - simply registered) domains.

DNS WTF?
Much confusion arises from first-time adventures into modifying DNS records. One of the first things to understand is that an A record is not a CNAME record is not a MX record. There are many types of information stored within your DNS record each with its own name and purpose:
  • A
    A records store the IP address (IPv4) of a specific computer/server.

  • CNAME
    CNAME, canonical name, records allow domain names to be mapped to other domain names rather than specific IP address.

  • MX
    MX, mail exchange, records
Understanding that each DNS record type is its own animal will save you a big headache down the road. There are many more record types than what I listed, but these are the main records you may have to modify when setting Google services.

Conclusion
If you are going to migrate to Google's current array of services in lieu of costly web hosting plans, make sure you understand what is and is not possible. Make a plan before signing up for Google's applications to avoid potential conflicts.