Connecting Domain to sub-directory


#1

Hi,
I have a domain name ( for example: www.main.com) and hosting with dreamhost, but I also have another domain name ( for example: www.other.com) with another company. what i would like to do is take my other domain name www.other.com and make it point to my website which is hosted under www.main.com/newsite on dreamhost.
How do I do this? I don’t want my other domain name www.other.com to point to www.main.com, but to a folder inside it.

Thanks!


#2

You leave a number of unanswered questions, for example will nameservers for other.com be left pointing to “other host” and at “other host” do you have complete control of your .htaccess?

What I would so (assuming you’re trying to get rid of “other host” completely):
1 - add “other.com” to the dreamhost system using manage domains, set it for “fully hosted”.
2 - put an .htaccess file in the root for other.com with a 301 redirect to http://www.main.com/newsite You can find some examples here.
3 - change the nameservers for other.com to ns[1,2,3].dreamhost.com (this change can take up to 3 days to occur worldwide).
4- optionally, later you can transfer the registration.

You can also in dreamhosts system combine steps 1 and 2, and simply add other.com to dreamhosts system as a redirect. (that is, don’t fill out the “fully hosted” section of the form when you add other.com at dreamhost, but scroll down and just fill out the “redirect” section.

If the “other host” stays in the picture you have to live with capabilities they give you. you may just be able to drop an .htaccess in there to redirect but it might be different if they restrict you, use a different O/S, don’t use apache…etc.


#3

Thanks for your help!
I think I’ll just try and get rid of the other host, and transfer my domain to dreamhost.
After transfering my other domain (www.other.com) to dreamhost , would I be able to redirect it to show a folder inside www.main.com? i noticed the redirect option, but then people who go to www.other.com would see www.main.com/newsite in the address bar, and i wouldn’t want that to happen.


#4

This is different from the first question you asked. It’s definitely possible, but what are your motives for doing so? This is one of those cases were people can come up with a lot of complexity when none of it is really needed, and further you can end up confusing search engines such as google and when that happens your new traffic may stop.