Friday, October 24, 2008

Diagnosing Problems With Custom Domains: The Dig Tool

Whenever I answer a problem report in an open forum, in my email, or just in general life, which involves a blog published to a Google Custom Domain, I always start my answer with a Dig log. Dig is a very commonly used tool for querying DNS configuration data. Since many custom domain problems involve DNS setup, Dig is my first diagnostic tool.

Dig can be run locally (from your computer), or online (from a Dig server). Since Dig accesses online data, I find it reasonable to run it from online servers. I, personally, use the Kloth.Net Dig utility, which lets you select specific record types to dig for, and lets you specify a DNS server to Dig into.

If the Kloth service doesn't fill your needs, you are free to Google for "free online dns dig"; if so, you'll find numerous similar services. Eventually, you should find one to your personal liking.

Let's Dig the DNS records for this domain. Let's first look at the primary domain "nitecruzr.net".
; <<>> DiG 9.3.2 <<>> @localhost nitecruzr.net A
; (2 servers found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55301
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;nitecruzr.net. IN A

;; ANSWER SECTION:
nitecruzr.net. 3600 IN A 64.233.179.121
nitecruzr.net. 3600 IN A 66.249.81.121
nitecruzr.net. 3600 IN A 72.14.207.121


;; Query time: 160 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Oct 24 23:43:30 2008
;; MSG SIZE rcvd: 79


Next, the "www" alias "www.nitecruzr.net".
 ; <<>> DiG 9.3.2 <<>> @localhost www.nitecruzr.net A
; (2 servers found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12647
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.nitecruzr.net. IN A

;; ANSWER SECTION:
www.nitecruzr.net. 3600 IN CNAME ghs.google.com.
ghs.google.com. 34422 IN CNAME ghs.l.google.com.
ghs.l.google.com. 300 IN A 72.14.207.121

;; Query time: 175 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Oct 24 23:43:42 2008
;; MSG SIZE rcvd: 99


Now please note that the above logs are enormously wasteful in space. When I present Dig data in an online forum, I'll typically excerpt it to just the essential data.
 nitecruzr.net.  3600 IN A 64.233.179.121
nitecruzr.net. 3600 IN A 66.249.81.121
nitecruzr.net. 3600 IN A 72.14.207.121
www.nitecruzr.net. 3600 IN CNAME ghs.google.com.

---
ghs.google.com. 34422 IN CNAME ghs.l.google.com.
ghs.l.google.com. 300 IN A 72.14.207.121


In some of my articles, I'll abridge the log, showing the context of the query.

;; QUESTION SECTION:
;nitecruzr.net. IN A
;; ANSWER SECTION:
nitecruzr.net. 3600 IN A 64.233.179.121
nitecruzr.net. 3600 IN A 66.249.81.121
nitecruzr.net. 3600 IN A 72.14.207.121

;; QUESTION SECTION:
;www.nitecruzr.net. IN A
;; ANSWER SECTION:
www.nitecruzr.net. 3600 IN CNAME ghs.google.com.
ghs.google.com. 34422 IN CNAME ghs.l.google.com.
ghs.l.google.com. 300 IN A 72.14.207.121


What do we see in the above examples (abridged or condensed)?
  • The primary domain (ie, the "domain root") is redirected by Address ("A") to 3 servers, provided by Google Apps, "64.233.179.121", "66.249.81.121", and "72.14.207.121". Please note that, as of 2008/10/24, this configuration became out of date, and was replaced by 4 mutually redundant servers.
  • The "www" alias is redirected by Alias ("CNAME") to the Google custom domain load balancing DNS proxy, "ghs.google.com".
  • Each Address and Alias has a Time To Live ("TTL") of 3600 seconds, ie 1 hour. That one hour is the amount of time that a local DNS server can consider the DNS entry in its cache to be fresh. If a non authoritative server is asked for DNS information, it checks its cache, and it find data which is stale (has expired past TTL), it must refresh its cache by getting fresh information from an authoritative server. Note that TTL is a tuning factor, and it varies by DNS server. When you add a DNS address entry to your domain, unless you know what you're doing, accept the default TTL provided by the DNS Manager wizard.
  • With "www.nitecruzr.net" referred by "CNAME" to "ghs.google.com", "ghs.google.com" is referred by "CNAME" to "ghs.l.google.com", and "ghs.l.google.com" referred by "A" to "72.14.207.121".
  • To see this information in a real life GUI display, as setup with the GoDaddy DNS Hosting service (for instance), you may read Custom Domains - The Details In The DNS Settings.


Note that, occasionally, you may see slightly different results than what you see above. There are a couple subtle syntactical conventions, involved in using the various DNS Manager wizards provided by the thousands of registrars all over the Internet, which periodically create challenges for us.

Also note that if you just updated DNS addresses, you may have to wait while your local DNS server is refreshed. If you run a Dig against the domain authority server, you can get up to date results instantly.

Regardless of its intricacies and weaknesses, Dig is one tool in my Custom Domain Diagnostic toolset - the one tool that I use most often, in my custom domain diagnostics.

>> Top

9 comments:

Pareen Lathia said...

Do I have to put in A records or just CNAME?

I have a Google Apps account working fine at sunflowerthoughts.com

I am trying to set blog.sunflowerthoughts.com as my custom domain.

I wrote CNAME record for the url pointing to ghs.google.com

Also, my settings were accepted successfully in Blogger publishing.

Still I am getting a 404.

I read your http://blogging.nitecruzr.net/2007/11/custom-domain-publishing-and-404-error.html and followed the instructions. But no use.

Please help me.

Chuck said...

Pareen,

Please, ask this question in GBH: How Do I?, or in Nitecruzr Dot Net - Blogging. The online forums are much easier to use, then Blogger Blog Commenting, for interactive problem solving.

FreeWebsite said...

Nitecruzr Best Problem Solver

business blogger said...

I've a blog http://business-blog-4u.blogspot.com and redirected to my custom domain name www.businessplug.in that I've bought 1 week ago.Yesterday I've added a CNAME record for it.
The details are :
HOST NAME : www
VALUE : ghs.google.com (Fully Qualified domain name)
TTL : 38400
Whenever I tried to open the site or tried to redirect the blog the same parking page is appearing.
Again I tried to create a CNAME record but it is showing the error message as
Error Message: A record Exists having same name.Please Check For Record Conflicts.

What should I do? Please help me.

Chuck said...

What should I do?

Post these details in BHF: Something Is Broken, so we can discuss them easier.

rocky franks said...

i just bought a domain from go daddy.I did not have an account with blogger or google.While creating an account on the name the blog page,it asks me to search for url using blogspot .com.Do I do not have a blog right now,so i need to know if there is a way to point thisurl to blogger without first using a blogspot.com domain.

thanks for the help

Chuck said...

Rocky,
1. Setup a Blogger account (free).
2. Setup a Blogger blog (free).
3. Setup a righteous custom domain.
4. Publish your new Blogger blog to your new custom domain.

Reklaman.com said...

Thanks for good explanation of Dig-tools.

Wanderer said...

My goal was to keep everything on the same blogger dashboard and with the same accounts, etc. except for an email @ the .com address.