- Login to the DreamHost Web Panel
- Go to Domains -> Manage Domains
- Click on Add New Domain / Sub-domain
- Scroll down to the "Mirrored" section
- For "Create the mirror at:" type in mydomain.com
- For " Mirror this site:" select sub.domain.com
- Click on "Mirror this domain"
What will happen is that DreamHost will consider mydomain.com to be an alternate hostname. This means the web site can be reached at http://sub.domain.com/ or http://mydomain.com/
Once DNS lookups resolve to your IP address at DreamHost, web browser will tell the DreamHost computer that they want the web site named 'mydomain.com' or 'sub.domain.com' depending on the URL. Example:
GET /somefile HTTP/1.1
The DreamHost computer MUST be told about mydomain.com in order to do anything when a browser asks for a web site using that domain. And you tell the DreamHost computer by using the Domains -> Manage Domains -> Add New Domain / Sub-domain panel.
Customer since 2000 openvein.org