Monday, January 7, 2013

Pointing your own domain name to a (Blogger) blogspot.com site

Google's instructions on this subject are terribly misleading, and in an attempt to make them comprehensible to the layman make them worse.

Look at this screen shot by Google when you ask for instructions to set up spqr.mydomain.com to point to your own blogspot site:



It's incorrect. www.example.com is NOT a top-level domain. www.example.com is no different from foo.example.com as far as "levels" are concerned.

90% of the world have the impression that www is something special. "www.abc.com" (it should be "www.abc.com.") is a domain, just like "abc.com", or "com". Many people have difficulty understanding this, but that's how the Internet domain name system is defined, and works.  Do invest a minute to let this sink in.

The next error: you cannot add two CNAME records to a domain and still be meaningful.  A CNAME record is, like 99.99% of the time, used to create an alias for a domain name.  When we say, lazily, "add a CNAME record for abc.com and point it to def.net", we mean create an alias for abc.com that resolves to the canonical name def.net.  In other words, when someone requests for the IP address of abc.com, he is redirected to def.net instead.  He will then have to continue his query to find out the IP address of def.net.

After some testing, this is what I discovered.  If you want your domain spqr.mydomain.com to point to xyz.blogspot.com,what Google needs is as follows:

Go to the Settings page, Publishing, Switch to Advanced settings and enter spqr.mydomain.com in the http box.
Click Save and you will be given the name of two CNAME records that you must create.  The two CNAME records are (based on the example in the screenshot):


(Note: you must have the ability to create the domain Z3O5FRCOSL73.spqr.com.)


Alias spqr.com to the CNAME ghs.google.com
Alias Z3O5FRCOSL73.spqr.com to the CNAME gv-D5HHKMK....thatverylong name.domainverify.googlehosted.com.

If you must have www to cater to people who like to type another four characters to reach a web site, then alias www.spqr.mydomain.com to spqr.mydomain.com, ie add a CNAME record to www.spqr.mydomain.com.

If your domain registrar allows very long names, then your job is done.  Mine, 1and1.com, spits out that second entry.  I don't know why Google has to make it so long.  A GUID is only 30+ characters.  So I have to resort to another name server, like ClouDNS.net, to solve my problem.  You have to basically set the name servers for your domain name to the third party provider instead.  Detailed instructions for an 1and1 example can be found here.

A word of caution to those who are trying out a sub-domain of a domain name they already own and whose registrar cannot take long names.  For example spqr.mydomain.com is already your active name used by web site and email, and you want to use xyz.spqr.mydomain.com to point to a site in blogger.com.  If you change the name servers for spqr.mydomain.com to ClouDNS.net in order to add the aliases for xyz.spqr.mydomain.com and ZZZZZZ.spqr.mydomain.com, you will have to duplicate all your current DNS entries at ClouDNS.net.  Not a wise or productive task to do.

In this latest scenario, you should point www.xyz.spqr.mydomain.com instead to Blogger.