The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DNS Zone Template Editor

Discussion in 'Bind / DNS / Nameserver Issues' started by asterisk, Jan 24, 2006.

  1. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I noticed that WHM's Zone Template Editor under DNS Functions seem to have a few variables such as %nameserver%, %rpemail%, %serial, %ttl% and %domain%

    Is there any way to find out what the other variables are? I have looked up the WHM docs for more info but there is nothing written.

    Anyone have any clues?

    A suggestion - perhaps more could be written on this please, as it's a shame to have such a nifty function go to waste due to lack of proper docs.

    Thanks.
     
  2. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    hmm... I would also like to know where cpanel stores all those values.

    Maybe try grepping for them in the cpanel directory ?
     
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
  4. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    That was a very nifty piece of info. Thanks! :) I'm assuming that there are no more other variables to play with other than those listed in the default Zone Template Editor files at /var/cpanel/zonetemplates

    Is it just my config or does everybody's WHM default Zone Template for the standard config, have the following line?

    www IN CNAME %domain%.

    Shouldn't this be:

    www IN A %ip%

    What is the advantage behind using CNAME instead of A in this case, since I understand this causes a slight delay when accessing a website due to the extra DNS lookup?
     
  5. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    There is no additional lookup delay, if the CNAME is the same TLD.

    For example, cnn.com uses a CNAME for www.cnn.com to point to cnn.com.

    > www.cnn.com
    Server: xxx
    Address: xxx

    Name: cnn.com
    Addresses: 64.236.16.52, 64.236.16.84, 64.236.16.116, 64.236.24.12
    64.236.24.20, 64.236.24.28, 64.236.29.120, 64.236.16.20
    Aliases: www.cnn.com

    Notice how I queried www.cnn.com and on the SAME lookup it not only told me that www.cnn.com is an alias (CNAME) for cnn.com, it went ahead and told me the IP addresses for cnn.com.

    All in one lookup.

    I can't say whether your way is right or wrong... but if CNN does it this way, it's OK by me so I'm leaving it the way it is.

    - Scott
     
  6. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for that piece of info.

    After some finding out, I've discovered that CNN's dns servers may be intelligently figuring out that a CNAME request from a user will usually be followed by an A request hence it decides to send both information in one go, saving an extra lookup otherwise.

    However not all DNS servers do as such.

    Having said that, the drawback apparently for assigning A records instead of CNAMES to subdomains such as www would be consistency. That if an IP address change, one would have to change every other IP address leading to a higher likelihood of error, I'm told.

    Well, I guess you're right, an extra lookup wouldn't really matter then generally. :)
     
  7. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    I checked and my DNS server (default cPanel installation) responds in the EXACT same way as the CNN server. So, I think the comment is very valid.. there is no extra DNS lookup and no negative reason for the way cPanel has set up the template.

    - Scott
     
Loading...

Share This Page