Hi,
I've posted this on features.cpanel.net and it's currently in a moderation queue because cPanel thinks they should be split up, however they're all very closely related and ultimately all fall down to one of two issues.
1. Incorrect use of subdomains in multiple areas
2. Lack of support for 3rd party DNS providers.
Let's go over the issues one by one...
##################################################
Subdomain Subdomains...
If you create a subdomain, for some silly reason cPanel decides to automatically create a www. subdomain which ends up leaving you with domains like:
When in reality how many sites have any of you ran into that that append www. to subdomains?
cPanel themselves don't even use www. subdomains on their subdomains so why does cPanel automatically add them for client subdomains?
Just look at the following two... they go nowhere because they aren't setup.
For reference, if you go and checkout the top 25 websites (According to Alexa) and/or checkout php.net, Cloudflare, CloudLinux, LiteSpeed, StackOverflow, Amazon Web Services, Google Cloud, DigitalOcean, WordPress... you won't find any of them prefixing any of their subdomains with an extra www.
Here are some example sites to show that they don't use www. on their subdomains.
AutoSSL then automatically attempts to generate SSL certificates for these www. subdomains and as a result of these unnessercery subdomains not being setup in external DNS providers like Cloudflare we get "AutoSSL reduced SSL coverage" emails sent to us.
It also affects 3rd party softwares like CloudLinux's "LVE Manager", specifically their feature called the "Web Monitoring Tool" where it incorrectly attempts to access these subdomains and of course they throw up errors because the subdomains don't actually exist.
Your current options are:
##################################################
Custom Document Root Placeholder Subdomains
If you add an alias domain and setup a custom document root, you are forced to create a subdomain as a placeholder so the cPanel system can track / assign a document root to the alias domain.
You can see what I am talking about here: https://i.imgur.com/lEPG8BP.png
There is zero reason this domain should exist, be used, let alone be secured by LetsEncrypt. It's sole purpose is to help track/assign/route for the custom document root.
As a result of this
AutoSSL attempts to generate SSL certificates for these placeholder subdomains, which just like the above are irrelevant and just for cPanel's system purposes. As such because no domain has been setup in Cloudflare we get "AutoSSL reduced SSL coverage" emails sent to us.
It also affects 3rd party softwares like CloudLinux's "LVE Manager", specifically their feature called the "Web Monitoring Tool" where it incorrectly attempts to access these subdomains and of course they throw up errors because the subdomains don't actually exist.
Your current options for this are:
I personally would suggest #4 is the best option, however the other options would solve the issue too.
##################################################
Mail Subdomain
If you create a new cPanel account it automatically creates a mail. subdomain, however in my opinion it should NOT create a mail. subdomain by default IF the mail routing is setup to "Remote Mail Exchanger" because most of the time when this is set they'll more than likely be using Office365, GSuite or other comparable offerings which very very rarely have a mail subdomain.
As a result of this
AutoSSL attempts to generate SSL certificates for these mail subdomains, even though they aren't needed and as such because the subdomain doesn't exist in Cloudflare we get "AutoSSL reduced SSL coverage" emails sent to us.
Your current options for this are:
My proposal options to solve this issue:
##################################################
Cloudflare API - Integration
Ultimately all of the above, could be solved by cPanel having some pre-made integrations with major 3rd party DNS providers like Cloudflare, Route53, Azure DNS, Google Cloud DNS... etc.
Considering cPanel & Cloudflare are very very commonly used together and the lack of complexity required to use the Cloudflare API this would be a good starting point for system for DNS management.
If cPanel sets up a templating system for integration scripts, you'd soon have lots of community built integrations for other DNS providers that could then be made official after some testing from other users.
It would also improve how you add subdomains, instead of having to add a subdomain both on Cloudflare & within cPanel you'd only have to do it in one place and then your DNS would be updated.
It would also let you use LetsEncrypt's DNS Validation because cPanel/AutoSSL would be able to add a DNS record straight to your Cloudflare account and then validate the entry with LE.
cPanel UI Side
Once you add your API key & email address to these integrations, you could then let the user see two columns of: "Remote Records" and "Local Records"
From this view the user should be either able to update the remote record to match the local record or vice versa.
Once all records are matching, all future DNS changes would update both the local records & remote records.
##################################################
I'd love to see everyones thoughts, criticisms or spot things I've overlooked because I'm sure there is something I've overlooked.
Thanks
I've posted this on features.cpanel.net and it's currently in a moderation queue because cPanel thinks they should be split up, however they're all very closely related and ultimately all fall down to one of two issues.
1. Incorrect use of subdomains in multiple areas
2. Lack of support for 3rd party DNS providers.
Let's go over the issues one by one...
##################################################
Subdomain Subdomains...
If you create a subdomain, for some silly reason cPanel decides to automatically create a www. subdomain which ends up leaving you with domains like:
When in reality how many sites have any of you ran into that that append www. to subdomains?
cPanel themselves don't even use www. subdomains on their subdomains so why does cPanel automatically add them for client subdomains?
Just look at the following two... they go nowhere because they aren't setup.
For reference, if you go and checkout the top 25 websites (According to Alexa) and/or checkout php.net, Cloudflare, CloudLinux, LiteSpeed, StackOverflow, Amazon Web Services, Google Cloud, DigitalOcean, WordPress... you won't find any of them prefixing any of their subdomains with an extra www.
Here are some example sites to show that they don't use www. on their subdomains.
- https://www.secure.php.net/
- https://www.mail.google.com/
- https://www.cloud.digitalocean.com/
- https://www.support.cloudflare.com/
- https://www.area51.stackexchange.com/
- https://www.developers.facebook.com/
- https://www.make.wordpress.org/
AutoSSL then automatically attempts to generate SSL certificates for these www. subdomains and as a result of these unnessercery subdomains not being setup in external DNS providers like Cloudflare we get "AutoSSL reduced SSL coverage" emails sent to us.
It also affects 3rd party softwares like CloudLinux's "LVE Manager", specifically their feature called the "Web Monitoring Tool" where it incorrectly attempts to access these subdomains and of course they throw up errors because the subdomains don't actually exist.
Your current options are:
- Create those subdomain records in external DNS providers
- Manually go through every account/domain and remove the www. prefixes for subdomains, remembering to remove them every time you create a new subdomain
- Manually go through every account/domain and disable AutoSSL for those www. prefixed subdomains, remembering to disable them every time you create a new subdomain
- An option to disable www. subdomain generation for subdomains WHM side (Just in case some clients of cPanels want the www. subdomain added to subdomains)
- Removal of automatic www. subdomain generation for subdomains (There is a chance that some clients do use www. subdomains for their subdomains, so probably not a wise option)
- Add an option to disable AutoSSL notifications for failed generation of www. prefixed subdomains.
- Add an option to disable AutoSSL attempting to generate SSL certificates for www. prefixed subdomains.
- Add an option to disable AutoSSL notifications for DNS records that have no record (blank record, if no IP exists then move on..)
- Add an option so if AutoSSL attempts to generate a SSL certificate, only notify the user of a failed certificate IF it had succeeded to generate a SSL certificate previously
##################################################
Custom Document Root Placeholder Subdomains
If you add an alias domain and setup a custom document root, you are forced to create a subdomain as a placeholder so the cPanel system can track / assign a document root to the alias domain.
You can see what I am talking about here: https://i.imgur.com/lEPG8BP.png
There is zero reason this domain should exist, be used, let alone be secured by LetsEncrypt. It's sole purpose is to help track/assign/route for the custom document root.
As a result of this
AutoSSL attempts to generate SSL certificates for these placeholder subdomains, which just like the above are irrelevant and just for cPanel's system purposes. As such because no domain has been setup in Cloudflare we get "AutoSSL reduced SSL coverage" emails sent to us.
It also affects 3rd party softwares like CloudLinux's "LVE Manager", specifically their feature called the "Web Monitoring Tool" where it incorrectly attempts to access these subdomains and of course they throw up errors because the subdomains don't actually exist.
Your current options for this are:
- Create those subdomain records in external DNS providers
- Manually go through every account/domain and disable AutoSSL for those placeholder domains, remembering to do this every time you add an alias domain.
- Change cPanel so that it marks these "document root placeholders" as such, so that AutoSSL, CloudLinux and any other software can easily ignore the subdomains from their routines.
- Add an option to disable AutoSSL from attempting to generate SSL certificates for these subdomains (This option would likely need to use option 1 as well)
- Add an option to disable AutoSSL notifications for failed generation of these placeholder subdomains.
- Create a better system of tracking the document roots for alias domains, removing the need for subdomains.
- Add an option to disable AutoSSL notifications for DNS records that have no record (blank record, if no IP exists then move on..)
- Add an option so if AutoSSL attempts to generate a SSL certificate, only notify the user of a failed certificate IF it had succeeded to generate a SSL certificate previously
I personally would suggest #4 is the best option, however the other options would solve the issue too.
##################################################
Mail Subdomain
If you create a new cPanel account it automatically creates a mail. subdomain, however in my opinion it should NOT create a mail. subdomain by default IF the mail routing is setup to "Remote Mail Exchanger" because most of the time when this is set they'll more than likely be using Office365, GSuite or other comparable offerings which very very rarely have a mail subdomain.
As a result of this
AutoSSL attempts to generate SSL certificates for these mail subdomains, even though they aren't needed and as such because the subdomain doesn't exist in Cloudflare we get "AutoSSL reduced SSL coverage" emails sent to us.
Your current options for this are:
- Create a mail subdomain, even though it won't be used.
- Manually go through every account/domain and delete the mail subdomain that don't need it, remembering to do this with every subsequent domain/account
- Manually go through every account/domain and exclude the domain from AutoSSL, remembering to do this with every subsequent domain/account
My proposal options to solve this issue:
- Change cPanel account creation so if "Remote Mail Exchanger" is setup on the account, the mail subdomains are not automatically created.
- Add an option to disable the automatic generation of mail subdomains by default for all accounts (Maybe even only if Remote is checked)
- Add an option to disable AutoSSL notifications for DNS records that have no record (blank record, if no IP exists then move on..)
- Add an option so if AutoSSL attempts to generate a SSL certificate, only notify the user of a failed certificate IF it had succeeded to generate a SSL certificate previously
##################################################
Cloudflare API - Integration
Ultimately all of the above, could be solved by cPanel having some pre-made integrations with major 3rd party DNS providers like Cloudflare, Route53, Azure DNS, Google Cloud DNS... etc.
Considering cPanel & Cloudflare are very very commonly used together and the lack of complexity required to use the Cloudflare API this would be a good starting point for system for DNS management.
If cPanel sets up a templating system for integration scripts, you'd soon have lots of community built integrations for other DNS providers that could then be made official after some testing from other users.
It would also improve how you add subdomains, instead of having to add a subdomain both on Cloudflare & within cPanel you'd only have to do it in one place and then your DNS would be updated.
It would also let you use LetsEncrypt's DNS Validation because cPanel/AutoSSL would be able to add a DNS record straight to your Cloudflare account and then validate the entry with LE.
cPanel UI Side
Once you add your API key & email address to these integrations, you could then let the user see two columns of: "Remote Records" and "Local Records"
From this view the user should be either able to update the remote record to match the local record or vice versa.
Once all records are matching, all future DNS changes would update both the local records & remote records.
##################################################
I'd love to see everyones thoughts, criticisms or spot things I've overlooked because I'm sure there is something I've overlooked.
Thanks
Last edited: