Multiple domains on one account?


I currently have three sites:, and Each is hosted on a separate account with DreamHost. They all use the same code (php).

I want to move them to one account (probably a new one named and use sub-folders for the different sites, and different database names.

Is this possible?

Example of hoped for directory structure for the new account:

/phpLib <== All the common php code
/ggwsl <= would map here
/lschool <== would map here
/baywood <== would map here

Each sub-folder would only have it’s own unique index.php file.

If this is possible then I have more specific questions (basically, how? I need the step-by-step details):

  1. For example, how do I get to resolve to, yet make it transparent to my users, so that their browsers still displays and not the full path?

  2. What would be the DOCUMENT_ROOT for these subfolders?

  3. What would be the syntax for php include files or html code?

For example if I have the file: ggwsl/index.php and it wants to include /PhpLib/System.php, what is the path?

Would include( “PhpLib/System.php” ) work? Or would I be prevented from using even include( “/…/PhpLib/System.php” )?

In the case of the ggwsl site, to what would the following HTML code resolve?

Would it look in /images or ggwsl/images

  1. And if this should all work out, then what is the recommended method for migration? To create a new account, migrate existing accounts, and then delete old accounts. Or should I seek to rename an existing account, and them migrate the others?

Sorry, I could not find the detailed answer to these questions in the forum. If the answers are already posted, please direct me.



The first thing which comes to my mind is to use remap. You can refer this article for more information.

If you are confused by the file path after you remap those folders, maybe you can try to replace DOCUMENT_ROOT with It should link to the right file then.

Btw, you can always create some free sub-domains and try out remap function via DH panel --> Domains --> Remap Sub-dir

Happy new year!

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


Thanks for the reply!

According to the explaination for remapping sub-folders this would not achieve my desired results. If I am missing something, could you please elaborate on how to map doman names.

What I want is:

if someone enters:
it resolves to user/home/

And if they enter
it resolves to user/home/

From the explaination for remapping sub-folders:

if the user types:
it maps to: user/home/

I want to make the “myaccount” part invisible to the user.

I guess, what I want to know (rephrasing my original questions) is:
Is it possible to map a domain names to sub-folders under my account?

This would relieve my headache of having to instantiate my files to multiple accounts.

BTW - If I can do this, I’m sure I can get around the DOCUMENT_ROOT issues. In fact I will (should have) mentioned that in a separate thread. So no need to address that question.



How about:

Create all three domains as being owned by the same user. You’ll end up with:

Then create:

Then I’d try to remap: to /home/iclarke/phplib to /home/iclarke/phplib to /home/iclarke/phplib

And even do the same with /images if you’d like.



Ah! Now I see it…this sounds perfect…and makes sense.

I got lost referring to the docs/discussion of mapping sub-folders and couldn’t see how to make them work.

I will contact support to see about implimenting this change to my current account (merge my three accounts into one).

…and thanks for the quick replies, this will save me a lot of headaches in the future, as I hope to add more domains!