Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Modifying / deleting auto created subdomains DNS records

Discussion in 'Bind/DNS/Nameserver' started by krembo99, May 25, 2019.

  1. krembo99

    krembo99 Active Member

    Joined:
    May 30, 2013
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I have a simple question.

    when creating an add-on domain or domain, cpanel/whm will create some default subdomains DNS entries / Zone records like :
    Code:
        www.addon.domain.tld
        whm.domain.tld
        cpanel.domain.tld
        ftp.domain.tld
    
    and others like cpcalendars - webdisk - mail ...etc etc.

    you get the point .. we all know them.

    SO - Assuming I have a server with numerous (cir.50) domains but without any external clients - All are own domains ( only internal company colleagues as admins ):

    1 - Is it safe to delete the above mentioned records ? will it create internal cpanel / whm issues ?

    We anyhow access the whm through main domain ( host.domain.tld:2087 ) and we do not use ANY of these features. not even ftp ( just sFTP ).

    ( and of course I am not talking about deleting SPF/DCV/DKIM records )

    2 - is there a way to stop whm/cpanel from creating them ? I have looked at the dns templates - But I do not think this is what I need ...

    The reasons I want to do that are A: keep the server / hostfile tidy. and B: a (bit) security issue with bots/scripts scanning said subdomains / login attempts.

    ( and I have another small unrelated question - how to edit the title of a thread like this one in this forum after it was posted ? for example add "subdomains DNS records" :) )
     
    #1 krembo99, May 25, 2019
    Last edited by a moderator: May 25, 2019
  2. Infopro

    Infopro cPanel Sr. Product Evangelist Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,877
    Likes Received:
    482
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. krembo99

    krembo99 Active Member

    Joined:
    May 30, 2013
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    @Infopro - thanks for the rapid reply .

    So basically in tweak-settings I can disable the DNS creation ( never paid attention to that option ) . Might be usefull to add an option to select which ones to enable by default and which ones to disable in the UI/UX

    I can also safely assume it is ok to delete them AFTER creation, correct? and that there is no automatic deletion function / script available from UI and deletion must be made one by one on all domains ?
     
    #3 krembo99, May 25, 2019
    Last edited: May 25, 2019
    cPanelLauren likes this.
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,124
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    The documentation here may be useful as well:

    Service Subdomains Explanation - cPanel Knowledge Base - cPanel Documentation
    Service and Proxy Subdomains - cPanel Knowledge Base - cPanel Documentation
    If you're not making use of them then yes it's fine to remove them. You can use the following to manage (including remove) the service subdomains:

    Code:
    [root@server ~]# /scripts/servicedomains --help
    Usage:
        servicedomains [action] [options]
    
            Options:
              --help                          Brief help message
              --man                           Full help message
              --user=                         User to configure
              --domain=                       Domain to configure
              --subdomain=                    Service subdomain to manipulate
              --no_replace=0                  Enable replacment of existing records (currently
                                              only used for changing autodiscover hosts)
              --old_autodiscover_host=        The previously configured autodiscover host (used
                                              for matching old records and updating them to the
                                              new host)
              --force_autodiscover_support=1  Behave as if the autodiscover support has not been
                                              disabled even if it has. This is useful for
                                              removing the autodiscovery service subdomains after
                                              the support for them has been disabled.
              --ifenabled                     Only perform the operation if service subdomains
                                              are enabled.
    
            Actions:
              add          Create service subdomains
              remove       Remove service subdomains
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. krembo99

    krembo99 Active Member

    Joined:
    May 30, 2013
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Thanks a lot. I used the supplied script and it is indeed the fasted way to do so.
    Thanks !
     
    cPanelLauren likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice