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!

Modify the default subdomains added to each domain?

Discussion in 'Security' started by Patrik, Oct 5, 2017.

  1. Patrik

    Patrik Member

    Joined:
    Aug 25, 2017
    Messages:
    18
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sweden
    cPanel Access Level:
    Root Administrator
    I would like to edit the default subdomains that are auto-added to each domain. For instance I add mydomain.com, and cpanel automatically adds subdomains "cpanel", "webdisk", "webmail", "mail". It also adds "www" whenever I add a subdomain to an existing domain.

    This makes AutoSSL a bit of a hassle because A) logs are filled with errors where domains can't be verified, B) It adds overhead to each AutoSSL request sent and afaik, that's not good when using Let's Encrypt, and C) It's just messy.

    So, is there any way I can disable the ones mentioned?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,230
    Likes Received:
    1,938
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Rather than deleting the subdomains, you can simply exclude them from the AutoSSL feature if that's the primary reason you want them removed. You can exclude subdomains from the AutoSSL feature for a specific account using the following option in cPanel:

    SSL TLS Status - Version 66 Documentation - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Patrik likes this.
  3. Patrik

    Patrik Member

    Joined:
    Aug 25, 2017
    Messages:
    18
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sweden
    cPanel Access Level:
    Root Administrator
    Hi,

    Ah yes I could do it per account I suppose, thanks.

    But is it possible to do on a server-wide scale, so they aren't added at all? I understand that Webdisk, Mail and so on would be affected, but this particular server will do nothing but host websites.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,230
    Likes Received:
    1,938
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You can disable proxy subdomains globally via the following options under the "Domains" tab in "WHM >> Tweak Settings":

    "Proxy subdomains"
    "Proxy subdomain creation"
    "Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation)"

    Then, to remove the existing proxy subdomain records for all accounts, run the following command:

    Code:
     /scripts/proxydomains remove
    Note the "mail" and "www" entries are not proxy subdomains and thus will remain on the system as aliases. It's not possible to remove these entries by default without modifying the default Apache template:

    Disable default www entry for all subdomains and hostname
    Add option to control ServerAlias www entries for subdomains

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Patrik likes this.
  5. Patrik

    Patrik Member

    Joined:
    Aug 25, 2017
    Messages:
    18
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sweden
    cPanel Access Level:
    Root Administrator
    Awesome, thanks!
     
    cPanelMichael 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