Create an alias using a subdomain of other user's domain

Santiago Botto

Registered
Apr 30, 2016
4
1
78
Argentina
cPanel Access Level
Root Administrator
Hi! On my server, I need to create an alias on an account using a subdomain of another user's domain.

I'll try to explain like this:

* I have 4 accounts on the server:

user0.com (user = user0)
user1.com (user = user1)
system.user1.com (user = system)
dev.user1.com (user = dev)​

* user1.com has user2.com as an alias

* I need to create two aliases of system.user1.com:

system.user2.com
system.user3.com​


Currently, when I try to add "system.user2.com" as an alias on dev's cPanel account, the error I'm getting is:

There was an error when the system attempted to create the alias. Park::park failed: (XID rp6qdn) The domain “system.user2.com” may not be created by “dev” because “user2.com” is already owned by another user.


Seeing that I can use several subdomains of a unique domain as separate domains when creating accounts (user1.com, system.user1.com and dev.user1.com), I imagine that there may be a way to get the same "freedom" when handling aliases. Of course, I know that allowing this is a security flaw in shared environments but I'm the only one that has accounts on this server so nothing happens that I don't want to.

Without cPanel, this would be easily handled by manually editing httpd.conf and corresponding vhosts, but that is not the proper way on cPanel...

I hope someone is able to help me figuring this out!

Thanks ;)
 

Santiago Botto

Registered
Apr 30, 2016
4
1
78
Argentina
cPanel Access Level
Root Administrator
So... It turn out that this was, in fact, quite easy to do but I really wasn't able to find a solution when googling, so I leave it here for future reference.

To do what I needed, you only need to turn on a specific option from Tweak Settings (Home > Server Configuration > Tweak Settings):

Allow cPanel users to create subdomains across accounts

That's it!

Thank you cPanel support for pointing this out!
 
  • Like
Reactions: cPanelLauren