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.

Removing cPanel comments from zone templates

Discussion in 'cPanel Developers' started by muffy, Sep 21, 2010.

  1. muffy

    muffy Registered

    Sep 21, 2010
    Likes Received:
    Trophy Points:
    every time I edit DNS zones cPanel adds some header comments like "cPanel first:11.26.8-BETA_48361..."

    Is there a way to avoid this? I tried to modify Zone Template removing:

    ; cPanel %cpversion%
    ; Zone file for %domain%

    into the simple, standard and virtualhost template but cPanel goes on adding the above comments.

    Best regards
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Dec 17, 2009
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator

    How are you editing the zone files? Manually at /var/cpanel/zonetemplates/ or through the WHM >> DNS Functions >> Edit Zone Templates?

    For discussion purposes, I'll be referencing the 'standard' zone template, but my comments apply to all the templates (simple, standard, standardvirtualftp)

    If you use WHM to modify the zone templates, your changes will be save as a new template called 'root_standard' and any function within WHM/cPanel that uses the 'standard' zone template should give priority to your modified (new) template over the general template (which will still resides in /var/cpanel/zonetemplates/). This is to ensure that with your server is updated, we don't over write a custom zone template you've crafted.

    If you want to manually edit a zone template, first copy the template from 'standard' to 'root_standard' and then make your edits on 'root_standard'.

    I've double checked this on both WHM/cPanel 11.26.8 and 11.27.77

    In future versions of WHM/cPanel, namely 11.28, you will be able to place custom zone templates in that directory for use by the XML-API's 'adddns' function. This feature has already been documented here, AddDNSZone < AllDocumentation/AutomationIntegration < TWiki . I'm unsure where in WHM/cPanel that the utilization of custom templates will be allowed as there is no product planning slated for updates or revisions to WHM DNS zone editor UI; just the XML-API.

    Best Regards,

Share This Page