I recently got a domain and set it up with Google Apps including setting up sub-domains for the different services.

After set up the CNAME, all my subdomains point to ghs.google.com. I was wondering how this works with all subdomains pointing to the same site.

1 Answer 1


Your browser sends a request to Google's server with the Host: yoursite.com header.

Google looks up this hostname in a (very large) database mapping hostnames to websites, then serves the corresponding website.

This database includes App Engine apps, Google Apps aliases, BlogSpot blogs, and other things.

  • OK, but if that is the case, surely the header must be 'subdomain.mydomain.com` otherwise how would it know whether to look up a Blog or and App. Feb 27, 2012 at 12:29
  • Try the live headers for firefox plugin and see whats being sent, but the process outline above is roughly how it works. Feb 27, 2012 at 15:10
  • Thanks. Firefox is awesome. So I guess the Google servers must differentiate on the basis of the the Host name passed in the headers. Makes sense. Feb 28, 2012 at 1:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.