Web directory in subdirectory?


Does a web directory have to be a first-level subdirectoy of a user directory, or can I have web directories in a second- or third-level subdirectory in order to keep my user directory tidy?

I plan to be hosting websites for several branches of the same company, each branch will have a domain name for its main website. Each branch may also have domain names set up for specially targeted websites and for landing pages associated with advertisements.

For example like this:



You can set whatever web directory you like. Just tested this out and it looks like you can put whatever you want before the second “/” on the fully hosted domain settings page.

Use the [color=#CC0000]3DOM50[/color] promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!


As Lensman says, that’ll work just fine - just be careful of your .htaccess files. With that setup it is pretty easy to have a site borked by an “uptree” .htaccess file you forgot about! :wink:



You could also give each group of domains its own user and still use the default domain.tld structure if you wanted to.



Whatever’s easiest for you to keep track of.

:stuck_out_tongue: Maximum savings promo code: MaxSavingsAtDH


Thanks for your help.

I am not sure what would be easiest for me, since I haven’t done a project of this size before. One of my main concerns was not having to switch between multiple user accounts to maintain these websites. Although my clients are branches of the same company, I will be contracting with each separately and independently. But each will use the same design for its main branch website, and so will have common graphics, templates, and scripts. Each will have its own domain name (or subdomain name) but will use a common domain name with a unique IP address for secure transactions. Any advice about whether, in the long run, it will be better (easier or more efficient) to set them up under separate user accounts, one for each branch, or set them up under the same user account?


If these are indeed separate clients of yours, there’s good reason for setting each up in a separate user account - for instance, just in case you have to give them access to the account for some reason.

Are you going to share anything between the two sets of sites?

Use the [color=#CC0000]3DOM50[/color] promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!


The branch websites will share graphics (like the company logo), templates (some of the pages will be dynamically generated on the server but most will be static) and scripts (for inquiry forms). I assume these common elements can be kept in any of my user accounts as long as I use a full path to link to them, but there might be good reasons (that I can’t anticipate ahead of time) for having all the branch websites under the same user account or having them in separate accounts. I know from another post I saw that, if one of the branches does want FTP access, that I can set up a user account for them and a directory that points to the actual web directory in another account, so I can give each branch FTP access to its own site either way.

If possible, I would like to not find out later that the organization I chose wasn’t the best and then have to consolidate the separate accounts or divide one account into separate accounts. So I am asking if someone who has done this sort of thing, or who is just generally more experienced than me, can predict for me which way of organizing these sites I will be happier with down the road.