Friday, August 15, 2008

How to point your Google Site to an existing Domain Name

For all you guys moving your clients over to Google apps hear ye, hear ye!

I recently created a Google site for my fiance's interior design business under my personal Google account, without realizing that there would be no way of moving it to a Google apps account once I was finished. No migrate tool, no export nada! I had spent a fair amount of time figuring out the Google Site GUI, and the last thing I wanted to do was to recreate the entire site again in the Google Apps account which I had created for her domain. I was under the impression that I could create a business class Google apps account with my existing logon - but I was wrong. Google apps requires an Administrator for a domain and so needs to separate the accounts by design.

Although I understood why, the most annoying thing with Google Apps is that you cannot associate your Administrator account with your personal Google account; and flipping between the two causes annoying cookie retention problems. Google has done a good job at recognizing this issue and has some automated tools that recognize the two accounts and tries to help navigate you to the correct account. But still there was no function or tool which I could find that would allow me to tie the personal Google site with an existing domain nor migrate a Google site from my personal account to my domain Google apps account .

The way I managed to point my Google Site to an existing domain was to first go to my host's Cpanel for and create a CNAME for a new sub-domain, in this case pointing to


The next step is to login to your Google site settings and add the sub-domain you just created to the Web Address section.


I then created an .htaccess file with (good tutorial is located here) and entered in the following code without quotes:

"redirect 301 /index.html"

or for all files on your domain use

"redirectMatch permanent ^(.*)$"

Obviously, you want to replace /index.html with your default page (could be index.htm; or index.php etc.) and with your sub-domain name you created in the previous section. This is a more SEO friendly way to redirect a site versus using Meta tags to do it, which I wouldn't recommend.


I logged onto the FTP for and uploaded the .htaccess folder to the root of the site. This is the same location as your index.html (or your equivelant) file and CHMOD the file 644. The .htaccess file will now redirect all traffic showing up at to in real time. As an FYI, the .htaccess is a hidden file and usually waon't be displayed in your FTP client once uploaded so Enable View Hidden Files is a good tutorial.

If anyone knows a better way to do this or there is a problem with this technique, please comment!