cancel
Showing results for 
Search instead for 
Did you mean: 
Go to solution
New

cPanel subdomain forced to be in the public_html directory

Hi there!

I have a web hosting here with many domains being hosted in it. all of the domains are registered from Godaddy.

Whenever I add a domain, I make its root in the user home directory, and any subdomains for it are in the same domain directory (not the public_html directory), example:

 

home/user/
home/user/domain1.com
home/user/domain2.com
home/user/domain2.com/sub1
home/user/domain2.com/sub2
home/user/domain3.com
home/user/public_html

But now things have changed, when I add a subdomain for one of my domains, cPanel force the directory to be in the public_html directory.

 

My questions are:

How to make the subdomain reside in its parent directory? (like it used to be).

If that is happening because of the new cPanel version, can I downgrade to the previous one?

 

I'm not new at this, I know my way around cPanel. I've been using Godaddy more than 6 years and this is the first time I face a problems with cPanel. I don't know what's wrong! (there is no one else has access to my account, and I'm not allowing any SSH access)

13 REPLIES 13
Super User III
Super User III

Re: cPanel subdomain forced to be in the public_html directory

Hey there @m_o,

 

I've been a GoDaddy customer and cPanel user for the better part of a decade and this is the way GoDaddy's file structure on cPanel has always worked. The primary domain in public_html and all subdirectories for addon/subdomains in the same public_html.

 

This is not typical of most cPanel installations however. Most work the way you state. Primary domain in public_html, subdirectories in the root. That's not the case with GoDaddy, though. Not sure why, to be fair, but I'm sure there's some sort of reasoning behind it. 



I am a GoDaddy End User - Just Like You
Check out my site! | I drink and I know things. Especially about websites and web hosting.
* Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community


New

Re: cPanel subdomain forced to be in the public_html directory


@MrVapor wrote:

Primary domain in public_html, subdirectories in the root. That's not the case with GoDaddy, though. Not sure why, to be fair, but I'm sure there's some sort of reasoning behind it. 


 

@MrVaporThanks for taking the time to answer my question, appreciate it.

 

I only use cPanel with GoDaddy and the way you described works well.

I have many domains with their subs all in the user home root, never in the public_html. so yeah, Godaddy cPanel was working like any other cPanel (as you described)..

 

I don't want to start having unrelated directories in my public_html, this is frustrating! I'm already thinking of ditching godaddy hosting and lunching cPanel for on my amazon vps becuse of this.

 

Super User III
Super User III

Re: cPanel subdomain forced to be in the public_html directory

You, of course, need to do what's best for your business but this seems more like an aesthetic desire as opposed to a functional one. Keep in mind migrating will come with costs like new hosting, downtime, etc.

 

Good luck!



I am a GoDaddy End User - Just Like You
Check out my site! | I drink and I know things. Especially about websites and web hosting.
* Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community


Helper I

Re: cPanel subdomain forced to be in the public_html directory


@MrVapor wrote:

Hey there @m_o,

 

I've been a GoDaddy customer and cPanel user for the better part of a decade and this is the way GoDaddy's file structure on cPanel has always worked. The primary domain in public_html and all subdirectories for addon/subdomains in the same public_html.


I am not sure why you think this because it isn't true. This is a recent change with a recent update.

 

One of my accounts has three subdomains configured to have their document root in my home directory and not within the public_html folder within the document root of my main domain.  Recently, when editing the document root of one of them to add one level down to the existing document root, it began forcing the public_html. I spoke to them about it because they now just broke an existing installation as I could not save it back to its original document root, but they said they there was nothing they could do but were looking into possibly changing it. The two subdomains that I haven't edited remain with their document root set to a folder within the root of my home directory.

 

This is actually really bad practice because many applications require a document root set one level down from the application root so as to keep much of the code from being publicly accessible. By GoDaddy making this change, it basically means many applications cannot be installed as a subdomain in a secure manner. 

New

Re: cPanel subdomain forced to be in the public_html directory

@aNorthernSoul 

Thank you, finally someone get why this is so important. I wonder if GoDaddy will fix this soon.

Community Manager
Community Manager

Re: cPanel subdomain forced to be in the public_html directory

Hi @m_o @aNorthernSoul @MrVapor. As has been mentioned, having domain root outside of /public_html was possible a short while ago. When we removed our custom skin, the feature was removed as well. As mentioned in this thread, our developers are determining whether or not we will add the feature back in a future update. If I have more information, I will update there. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.
Helper I

Re: cPanel subdomain forced to be in the public_html directory


@JesseW wrote:

Hi @m_o @aNorthernSoul @MrVapor. As has been mentioned, having domain root outside of /public_html was possible a short while ago. When we removed our custom skin, the feature was removed as well. As mentioned in this thread, our developers are determining whether or not we will add the feature back in a future update. If I have more information, I will update there. 

 


It's a setting in WHM. I outlined it in the thread you linked to. When you upgraded cPanel, it turned the default setting back on. Just turn it off on the shared hosting servers. It's not that hard unless you've done more customization, in which case, remove anything you have added to force that. It's not rocket science.

New

Re: cPanel subdomain forced to be in the public_html directory

This is crazy. I have a whole application setup outside the public root directory. This needs to be reverted.

Re: cPanel subdomain forced to be in the public_html directory

@JesseW 

 

When is this going to be resolved?

 

Pretty major   issue created by   GD forcing us to change a lot of things - Simple fix???

 

 

 

 

Helper I

Re: cPanel subdomain forced to be in the public_html directory

Any word yet on when you guys will be fixing this? 

New

Re: cPanel subdomain forced to be in the public_html directory

As others in this thread have indicated this is a critical regression that fundamentally changes how sites are set up. I have ~25 sites set up on my account and all are outside of /public_html.

 

As an example of the problems this causes, I'm in the process of switching one site to a new domain, and I'm now unable to point the new domain to the existing site files, because no matter what I do it forces the path to /public_html. Please restore the old behavior.

New

Why godaddy forcing people to create addon domain directory in public_html in cpanel?

Hi there,

I am working in web industry since last 8 years and godaddy is the my major service provider company for my clients as well for my personal use, but today when i am looking into my cpanel hosting to create new addon domain for my new website, it start forcing me to create directory within the public_html. what the mess?

 

Although i have 5 more websites hosting in home directory (outside public_html). i think this should be going to be fixed by godaddy team. this may be serious issue when it comes to SEO part, because it may be causes main domain to start indexing your files from other website's directory inside public_html.

 

How its hard to fix. just go WHM for shared hosing and, Access option Server Configuration >> Tweak Settings. Look for public_html subdomains only Set it to Off. When set to On it prevent users from creating subdomains outside of their public_html directory. 

 

Please consider our request to fix this issue ASAP.

 

 

Thanks & Regards
Full Stack Developer & SEO/Marketing Professional
Community Manager
Community Manager
Solution

Re: Why godaddy forcing people to create addon domain directory in public_html in cpanel?

Hello everyone. I just wanted to give a quick update here to let you all know that the ability to have your document root above /public_html has now been restored for all accounts. Thank you all for your patience and for providing your feedback. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.