Error: Unable to add SUBD.MYDOMAIN.COM when MYDOMAIN.COM belongs to a different user

Let me continue the discussion from this other thread in 2021 with the same title:

It seems the wonderful HestiaCP team has implemented an easy way to solve this “security limitation” through the panel :muscle:t4::muscle:t4::muscle:t4:, but I have not found it explained in the documentation or forum. I think it’s necessary to explain this solution somewhere to save others the 30 minutes of searching/exploring it took me.

Scenario of the error

  1. i added MYDOMAIN.COM through userA
  2. i try to add SUBD.MYDOMAIN.COM through userB
  3. the system return this error: “Unable to add SUBD.MYDOMAIN.COM. MYDOMAIN.COM belongs to a different user”

This “limitation” solves a security concern: preventing any user from creating subdomains (and email accounts) for domains they don’t own. This is especially useful in certain business environments where people use HestiaCP to provide hosting services. However, it also causes problems in trust-based environments or - as in my case - when I simply want subdomains of my own project split across users to “containerize” installed web apps.

GUI solution

  1. Log in as the ADMIN user
  2. Go to Settings > Configure > Security > Policies
  3. Set “No” for “Domains - Enforce subdomain ownership”

Then you will be able to seamlessly add subdomains from any user.

I hope this save time for others. Again, thanks to wonderful HestiaCP team!

1 Like

What does the “Enforce subdomain ownership” policy mean?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.