can we make a new root directory in subfolder of main root directory?


Mar 18, 2013
cPanel Access Level
Website Owner

i am the owner of website i want to make a new website for my friend (website name is approached me for domain name(which we already booked) and webspace .. ..but i already have a webspace which i am using for will do the following steps

1.)make a new folder of name of bawawafer and place all his files that we can see all files in

2.)make an ftp server from cpanel for my friend to acess all his files in bawawafer folder.

3.)create an addon domain from cpanel

4.)give the dns address of my hosting server to domian name

so now the problem is that i dont know that whether when he opens ...will he be directed to and if yes then will the url will open of or

is it possible to have a root directory of inside (folder name inside server) that if somebody types in url box the index file will be opened from user or nobody knows that its inside gamearics server folder..

thanks in advance


Well-Known Member
Feb 4, 2006
cPanel Access Level
Root Administrator
You create the addon domain 1st, and set the root folder of it to public_html/bawawafer.
That creates the directory public_html/bawawafer and you can upload the files there.
It also creates a ftp account for that addon domain.


Well-Known Member
Oct 20, 2008
cPanel Access Level
Root Administrator
When he open, he will be able to see the site directly. But if he try to access , it will open the same website without changing the url. Also there is a chance that search engines will index the url as well. You can avoid this by placing the following rules in .htaccess.

Please note in my example:

addondomain = Rootdomain name
the-hosting-domain = The domain name that hosts your add-on domain.

Here is what you need to put in you htaccess file in the directory that houses your add-on domain ie.

Options +FollowSymlinks
RewriteEngine OnRewriteCond %{HTTP_HOST} ^addondomain\ [NC]
RewriteRule ^(.*)$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www.addondomain.the-hosting-domain\
RewriteRule ^(.*)$$1 [R=permanent,L]

RewriteCond %{HTTP_HOST} ^addondomain.the-hosting-domain\
RewriteRule ^(.*)$$1 [R=permanent,L]
And add this to the .htaccess file in the root domain: ie.

Options +FollowSymlinks
RewriteEngine OnRedirect /addondomain
That should work!