Main domain to sub-directory of public_html


hyde

Recommended Posts

Is it possible to have my main domain in a sub-directory under public_html, instead of the root of public_html?

So instead of:

/public_html/index.html

/public_html/[addon domain]/index.html

Have this:

/public_html/[main domain]/index.html

/public_html/[addon domain]/index.html

Link to comment
Share on other sites

There needs to be one domain pointing to your public_html folder. This does not stop you from doing this though:

public_html/index.html

[addon domain]/index.html

The recommended url is not the one you need to use. When you create an add-on domain you can remove the public_html portion from it.

Link to comment
Share on other sites

I think I see what you're saying.

I assume then I could also just do something like this:

/public_html/index.html

/addondom/[addon domain 1]/index.html

/addondom/[addon domain 2]/index.html

Leaving the main domain the way it is, but making a new root folder called "/addondom", and just setting the addon pointers accordingly in cpanel.

Link to comment
Share on other sites

Exactly.

Sorry I mis typed it before it should have been

public_html/index.html

[addon domain]/index.html

You could break it down more like you suggested to. Totally up to you my point was you do not need to have the add-on domains in your public_html folder.

Link to comment
Share on other sites

  • 3 months later...
There needs to be one domain pointing to your public_html folder

Does this mean we can't rename the public_html folder to something different, then create a symbolic link named public_html to point to where we want it to go? The server would still point to public_html, but since it would be a symbolic link, it would point to where we would like to store our files.

I attached a zipped folder that contains a pdf of the way I like to use as a folder structure. It keeps everything nicely organized and contained.

Do we have permission to alter the public_html folder in the way I described?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...