--- In [email protected], "sameer2803" <sameer2...@...> wrote:
>
> Hi all,
> Please help me out
> 
> i have hosted a site www.example.com so the DNS config in zone file will be 
> as:
>                       ; zone file for example.com
> $TTL 2d    ; 172800 secs default TTL for zone
> @             IN      SOA   ns1.example.com. hostmaster.example.com. (
>                         2003080800 ; se = serial number
>                         12h        ; ref = refresh
>                         15m        ; ret = update retry
>                         3w         ; ex = expiry
>                         3h         ; min = minimum
>                         )
>               IN      NS      ns1.example.com.
> joe           IN      A       192.168.254.3
> www           IN      CNAME   joe 
>  Ignore if any mistake in the file. according to above file if we request for 
> www.example.com it will get the CNAME as joe and will follow the CNAME chain 
> unless it gets the A record for the site i.e 192.168.254.3.
> 
> 
> If am not wrong,We can write the above file as 
> 
> joe           IN      A       192.168.254.3
> www           IN      A       192.168.254.3
>  So what is the actual reason for using CNAME.just saying its used for alias 
> wont do.when we can write as ablove why to use canonical name,we can straight 
> away give the IP with A record.
>



First of all,
the following second entry is a host of example.com 

joe           IN      A       192.168.254.3  (joe.example.com.
www            IN     A       192.168.254.3  (www.example.com.)

u  can  write the following
www.joe       IN       A      192.168.254.3
(that means www.joe.example.com.) FQDN

.  is  your  root server
com is first level domain
example is second level domain
joe  is third level domain
www  is  a hostname



For Cname
joe           IN      A       192.168.254.3
www.joe           IN      CNAME   joe 

IN Future  IF u  change  ur Address record, then no need of  changing for  www 
host.
So if you have  mutiple hosts pointing  to the same  A  record  then using  
cname is  understandable.

Regards.
B.Sadhiq


Reply via email to