tags:

views:

answers:

I recently moved my website to a shared hosting solution at asmallorange.com, but I had to set my domain to use their provided nameservers in order for the site to properly resolve. I was determined to keep control of the domain's DNS but I could find no way to make my top level domain resolve to the shared location which was in the format of

server.asmallorange.com/~username

So I know I'm missing something here, my question is this:

What in their nameservers/DNS entry makes it possible for server.sharedhost.com/~username to serve as a top level domain? (ie. http://topleveldomain.com)

+6 A:

Nothing. DNS simply maps topleveldomain.com to server.sharedhost.com. It's the webserver which looks at the Host: topleveldomain.com header and knows that's equivalent to server.sharedhost.com/~username.

Nothing. They are having your domain name resolve to the same IP that server.asmallorange.com resolves to, but then they are making their web server aware of the domain name topleveldomain.com, and telling the webserver that it is the same as server.asmallorange.com/~username.

Virtual hosts aren't a DNS trick, they're an HTTP trick - the hostname requested is sent by the browser in a Host: field of every request.