Sites in Root or Public_html?

Eladnova

Registered
Feb 2, 2018
4
0
1
Dublin
cPanel Access Level
Website Owner
Hi guys

Brand new to cPanel as I normally use Plesk but I'm liking it a lot.

One thing I'd love to know from veteran users.
I have a new Shared Hosting account with A2 hosting and can host "unlimited sites". In reality I just want to store about 20 separate client sites which are relatively low on resources.

Is there drawback to storing my client addon domains in the root instead of my public_html folder?

I like the idea of separate spaces and realise I'll have to preview using a host file. But other than that are there any development, technical, SEO, strategic drawbacks to this approach?

Many thanks
 

Eminds

Well-Known Member
Nov 10, 2016
319
32
28
India
cPanel Access Level
Root Administrator
Well the scenario you have mentioned can be done however you will have to work alot on permissions hence storing the websites in public_html is the folder where the webfiles has to be placed.

Regarding the approach you have mentioned , I don't think there are any strategic drawbacks.
 

Eladnova

Registered
Feb 2, 2018
4
0
1
Dublin
cPanel Access Level
Website Owner
Well the scenario you have mentioned can be done however you will have to work alot on permissions.
Thank you for answering @Eminds
Would you mind giving me an example of potential permissions problems. Are these permission issues for general front end views of the site?
Currently I've setup host access and can connect to the site and database fine.
 

cPWilliamL

cP Technical Analyst II
Staff member
May 15, 2017
258
30
103
America
cPanel Access Level
Root Administrator
Hi @Eminds
Would you mind giving me an example of potential permissions problems
Perhaps they are referencing WHM > Tweak Setting "
Restrict document roots to public_html"(publichtmlsubsonly). If you are not restricted to 'public_html', I'd recommend using the account's homedir(e.g. /home/username/addon.com/). This provides a bit better segregation, which can be very helpful in the event of a compromise. Should everything be placed in 'public_html', one site compromise would very likely result in all sites littered with malware. It's still possible that additional domains placed in the user's homedir could be infected from other addon domains within the same account; however, it is less likely.