Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EbrahemSamer's avatar

How to change the document root of alias ( From Cpanel ) ?

I have a domain ( domain.com ) and I've a addon domain ( addondomain.com ).

when I create an alias to point to the addondomain, By default it points to public_html/ ( document root ).

I wanna change this public_html to be addondomain/ ?

0 likes
3 replies
automica's avatar

@ebrahemsamer ok. so go to sub domains section in cPanel and each of your sub domains has a column called 'Document Root' which has a icon that looks like a house, a path to the directory, and a pencil icon.

click pencil icon, and you get a popup to 'Change Document Root'.

Please or to participate in this conversation.