Wednesday, July 8, 2009

Setting up a multi-domain site on webfaction

I have a client that has a number of domains that should be treated as synonyms for each other. His site's structure is such that 'www.client.com' and 'client.com' point to a corporate site, while all other direct subdomains go to audience specific sites - for example 'genius.client.com' might be a site for nobel laureate physicists while 'idiot.client.com' might be specialized for Oracle salespeople.

The sites are currently setup on webfaction's shared hosting, and using name.com for name and dns services. Google Apps is taking care of mail and groupware. The process for setting up the original corporate site was:

name.com
  • register the domain at name.com
  • use name.com's google-apps express setup to setup the mail hosting
  • edit the dns on name.com to point 'www' and '(null)' to my assigned webfaction box (web75) using 'A' records. in retrospect maybe I should have just pointed 'null' to webfaction and use a CNAME for 'www'
webfaction
  • create a 'domain' for 'client.com'
  • create a subdomain for 'www' under client.com
  • create an 'application' for the corporate website
  • create a 'website' for the corporate website that maps 'client.com' and 'www.client.com' to a document root and site configuration.
Now when I want to add a new domain alias or synonym site I -

at name.com
  • create new domain.
  • manually setup all the google crap in dns (not sure if this is really necessary)
at webfaction
  • create a new domain
  • add it to the existing website
And when I want add a new sub-domain/sub-site I

at name.com
  • create A or CNAME records in the primary for the new subdomains
  • create CNAME records in each synonym/alias domain for each subdomain pointing to their corresponding primary records
at webfaction
  • basically the same thing as at name.com except using WF's tools
  • ...
It kind of sucks.

Also, it screws up google maps, which has a one-domain-per-key policy...

No comments:

Post a Comment