Friday, June 27, 2008

Custom Domains - The Details In The DNS Settings

I've been helping people set up their custom domains for over a year now. We've dealt with simple setups, and complex setups - from a domain setup in 5 minutes using "Buy A Domain For Your Blog", to ones that take much longer because the domain itself is in use and requires Google Apps configuration. Occasionally, odd questions come up
Chuck, what is "3600"?
or
Does my blog have to be published to either "mydomain.com" or "www.mydomain.com"?
or
Do I have to point the blog to "ghs.google.com"?


The latter question wasn't easy to answer intelligently, basically I answered
You can point the DNS to any host name that you wish, but if you want a working custom domain, stick to "ghs.google.com", and lets get this done.


For an answer to the first two questions, and others, let's look at the setup process. Within the setup process, let's look at how this blog, "blogging.nitecruzr.net" is defined as a logical host in my domain, "nitecruzr.net".

If you're here looking for instructions on getting rid of the address entry for the recently decommissioned Google Apps server, see The GoDaddy Domain Manager: Removing An Address Entry.

You start with the GoDaddy Domain Manager, with the domain loaded. In this example, my domain is "nitecruzr.net". Once you're logged in, you do not re enter the domain name when you add an alias. Only enter the alias name, when prompted for "Alias".

Add One Virtual Host

blogging.nitecruzr.net. 3600 IN CNAME ghs.google.com.


Simply hit the "Add New CNAME Record" button, and you get the "CNAME (Alias)" applet.
  • The Alias Name you enter as "blogging".
  • The Host Name you enter as "ghs.google.com".
  • TTL for .net domains defaults to 1 hour (3600 seconds).




Having successfully created the new CNAME record, we see it listed with the others.
  • Host is "blogging".
  • Points To is "ghs.google.com".
  • TTL is 1 hour.




Add One Complete "SubDomain"

Some folks refer to this as a "subdomain", though it's actually 5 virtual hosts. This example shows an ASymmetrical DNS configuration.

nitecruzr.net. 3600 IN A 216.239.32.21
nitecruzr.net. 3600 IN A 216.239.34.21
nitecruzr.net. 3600 IN A 216.239.36.21
nitecruzr.net. 3600 IN A 216.239.38.21
www.nitecruzr.net. 3600 IN CNAME ghs.google.com.


Do you see the 3 "@" entries for IP addresses "64.233.179.121, 66.249.81.121, and 72.14.207.121", in the "A (Host)" section? That's the 3 Google Apps servers previously defined for the primary domain ("@"). If you were setting the domain up initially, you would hit the "Add New A Record" button 3 times 4 times, and enter the 3 servers (as of 2008/12, we have 4 Google Apps servers - the 3 are now offline), using "@" to designate the primary domain, each time. You would next add a "CNAME" for the "www" alias, pointing to "ghs.google.com", using "www" to designate the "www" alias.



Note: When you define the destination of "ghs.google.com", be aware of whether your DNS host is configured to accept "ghs.google.com" as an absolute or a relative address. This is an essential distinction, and may not be universal.

Now, let's examine a brief Dig log for the new alias, "blogging.nitecruzr.net".
;; QUESTION SECTION:
;blogging.nitecruzr.net. IN A

;; ANSWER SECTION:
blogging.nitecruzr.net. 3600 IN CNAME ghs.google.com.
ghs.google.com. 586847 IN CNAME ghs.l.google.com.
ghs.l.google.com. 203 IN A 72.14.207.121


blogging.nitecruzr.net. 3600 IN CNAME ghs.google.com. This was provided by my DNS server, after I entered it above.
  • "blogging.nitecruzr.net." is the defined host name. The "." at the end makes it an absolute host name. You will always define an absolute host name.
  • "3600" is the TTL, in seconds. "3600" specifies a TTL of 1 hour.
  • "IN CNAME" is the syntax which defines a "CNAME" referral.
  • "ghs.google.com." is the referred host name, again specified as an absolute address.

ghs.google.com. 586847 IN CNAME ghs.l.google.com. This was provided by "ghs.google.com".
  • "ghs.google.com" is further referred to "ghs.l.google.com".

ghs.l.google.com. 203 IN A 72.14.207.121 This was provided by "ghs.l.google.com".
  • "ghs.l.google.com" currently refers to the server at "72.14.207.121". "ghs.l.google.com" is a load balancing proxy server. If the server at "72.14.207.121" had been offline or busy, you would have a different IP address here. This is why we always use a "CNAME" referral to "ghs.google.com" for a proper custom domain definition.


When you define your alias, you only add the first of the 3 records above. The latter 2 are provided by the Google servers.

The URL of this blog is "blogging.nitecruzr.net". If the DNS server that services your computer requests the IP address of the blog, it will be told, by the DNS server that services the blog, to "ask the host ghs.google.com". After "ghs.google.com" has provided an IP address, that address will be retained ("cached") by your local DNS server for 1 hour.

>> Top

10 comments:

Beto said...

Wow thanks... I did learn something today :)

Do you know how to manage DNS to run Blogger in the non WWW form???

I'm trying to solve this problem with http://poemas.ec, I want to show my blogspot in that specific URL, not the WWW form.

I'm managing the DNS stuff through http://editdns.net

Again thanks for the post,
Beto Aveiga

Chuck said...

Beto,

Thanks for the feedback. Custom domains have a lot of versatility, when you understand how to make them work.

You use Google Apps to manage the primary domain as a custom domain URL.

Ritardo "Gar the Conqueror" said...

thanks for the help. I still don't understand it 100% but it works. I wonder why google just gives you the cname instructions and not the rest like the 3 @ server numbers?

Chuck said...

Ritardo,

The instructions that you read were written long ago - when all of the setup was done by hand. Then they developed the Google Apps driven configuration, which is what everybody uses now.

Junior Art Lab said...

Hey Chuck!
Thank you so much for all your tutorials!
At one of your posts, I saw a familiar enom setup page & got everything done from then on.
You helped me alot understanding all the DNS settings & stuffs, ending my headache from the past 1 week.

Thank you once again!

Azmeer

Monica said...

Thanks for all your help! As someone who is computer illiterate I figured out I had to add the 3@server numbers.
Cheers!

Chuck said...

Monica,

Please re read the instructions. The 3 servers have been replaced by 4 different servers! Each of the original 3 servers are now offline!

COPYSTARS said...

I have 2 blogs by 2 sub domains point to ghs.google.com
It work perfectly the forst day and 2nd days both not found.

Any hints

Chuck said...

I have 2 blogs by 2 sub domains point to ghs.google.com
Any hints


Lots of hints - but we need to explore the details, in Blogger Help Forum: Something Is Broken, for the hints to mean anything.

Unless of course you would prefer to research this on your own?

CCPA said...

Hi there,

I have a blog www.policyfix.ca hosted by godaddy. I have no idea why the http://policyfix.ca isn't redirecting, and I'm getting super frustrated as I've never had this issue before with any custom domain names.

Any help?

(and yes, I have the "forwarding" option on blogger checked off)