Example.
Customer with 5 domains: one.de, one.com, one.eu, two.de, two.com
Account is created with one.com
User creates one.de as addon domain
System suggests to use subdomain (why?) with the name "one" which results in: "one.one.com".
System suggests [home]/public_html/one.de
User creates one.eu as addon domain
System fails because it again suggests "one" as subdomain. BLOCKER
User is smart and changes subdomain to "one.eu" which results in: "one.eu.one.com"
System suggests [home]/public_html/one.eu
User creates two.de as addon domain
System suggests "two" as subdomain which results in: "two.one.com"
System suggests [home]/public_html/two.de
User creates two.com as addon domain
System fails because it again suggests "two" as subdomain. BLOCKER
User is smart and changes subdomain to "two.com" which results in: "two.com.one.com"
System suggests [home]/public_html/two.com
Multiple things wrong with this approach:
Solutions/Suggestions
I know there is an option in tweak settings to remove the restriction of document roots to public_html, this does help but this opens another can of worms with the user being able to use existing directories like "log" or "mail". Ideally there would be an option to restrict roots
Restrict document roots to: [ ]
WHM Root can then control where the user creates these subdirectories. if possible include variables that get expanded like %domain%, %home% etc.
The same pretty much applies to actual subdomains.
Thanks.
Customer with 5 domains: one.de, one.com, one.eu, two.de, two.com
Account is created with one.com
User creates one.de as addon domain
System suggests to use subdomain (why?) with the name "one" which results in: "one.one.com".
System suggests [home]/public_html/one.de
User creates one.eu as addon domain
System fails because it again suggests "one" as subdomain. BLOCKER
User is smart and changes subdomain to "one.eu" which results in: "one.eu.one.com"
System suggests [home]/public_html/one.eu
User creates two.de as addon domain
System suggests "two" as subdomain which results in: "two.one.com"
System suggests [home]/public_html/two.de
User creates two.com as addon domain
System fails because it again suggests "two" as subdomain. BLOCKER
User is smart and changes subdomain to "two.com" which results in: "two.com.one.com"
System suggests [home]/public_html/two.com
Multiple things wrong with this approach:
- The system should suggest FQDN as subdomain to avoid the ERROR. Has this been tested?
- Why is a subdomain even needed in the first place. This is a completely independent domain.
- The user can not change this subdomain after creation so it should be hidden from the user on creation.
- Why is the main directory the root directory of the account domain? Every domain and subdomain should have their own unique directory for obvious reasons.
- The subdomain naming is also reflected in the log files ("two.com.one.com-ssl_log-%M%-%YYYY") which makes them equally ridiculous to maintain and use.
- If you create a new email it shows all the weirdly named subdomains. Does the user really need to see "mycooldomain.com.myfirstcooldomain.com"?
- These subdomains show up everywhere in the interface and just clutter it up and cause user errors. It's frankly ridiculous.
Solutions/Suggestions
- Don't show the subdomain option and instead use the FQDN. This removes errors and it is something the user should NOT be bothered with if he can not change it after the fact without completely deleting the addon domain (which results in possible data loss). It's bad UX, leads to confusion and support cases.
- Enable the user to change the subdomain in the addon domain window just like he can change redirection and document root.
- Why does the system even need a subdomain for addon domains? This is a seperate domain. Baffling decision to convolute and over complicate a simple issue.
- Creating the subdomains and addon domains as directories in the root of the main domain is insecure and error prone. I don't think i need to go into detail how completely ridiculous this is from a security and maintenance standpoint. Not to mention issues with .htaccess, user errors and much more.
- All domains should have their own isolated directory. See example for a reasonable and maintainable structure below:
I know there is an option in tweak settings to remove the restriction of document roots to public_html, this does help but this opens another can of worms with the user being able to use existing directories like "log" or "mail". Ideally there would be an option to restrict roots
Restrict document roots to: [ ]
WHM Root can then control where the user creates these subdirectories. if possible include variables that get expanded like %domain%, %home% etc.
The same pretty much applies to actual subdomains.
Thanks.
Last edited: