Hi guys, my friend at (examples used) http://friend.com has created a subdomain (http://piya.friend.com) for me on their Dreamhost account, and I would like to assign my Dreamhost-hosted domain (http://mysite.com) to this subdomain. How can I do this?
You will have to “redirect” in some form or another. Redirection via Panel would probably be the preferred method (click Edit next to your domain and scroll down to Redirect) which should have the effect of redirection occurring close to the DNS level - but I’m not entirely sure how Panel handles it.
A quick, basic method is to edit mysite.com/index.php placing this at the top:
<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://piya.friend.com"); exit; ?>
The above involves first-time visitors querying your own server first before being redirected.
PMJI - I have a similar situation, just want to really confirm the answer:
I want to host wiki.friend.com but I do not host friend.com here. I was going to tell them to set their DNS for that subdomain to point to DH where we would handle services, but in order to host a subdomain, the panel is telling me we first need to host the domain.
In short, I don’t own friend.com but they are eager to point a subdomain here.
Can we do that without http redirect?
If not, what issues are we facing? I’m thinking a redirect will be messy too but I’m wondering just how clean a cloak or other mechanism is. If someone comes to wiki.friend.com/page, is there any indication to the user that they’re landing at wiki.mysite.com/page?