I recently moved my website to a shared hosting solution at, 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

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

What in their nameservers/DNS entry makes it possible for to serve as a top level domain? (ie.

+6  A: 

Nothing. DNS simply maps to It's the webserver which looks at the Host: header and knows that's equivalent to

+5  A: 

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

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.

Daniel Papasian
HTTP 1.1 requires the Host: header. Virtual hosts typically require HTTP 1.1 for that reason. HTTP 1.0 does not have a host header that the server can key off of.
While HTTP 1.0 didn't define the Host: header, nothing prevents 1.0 clients from including one. It's trivial to change a 1.0 client to do that, and pretty much any remaining 1.0 clients do.

apache has a "mod_user" which you can enable in your apache conf file. Using this and virtual hosts is how that is accomplished.


Virtual Hosts in Apache are how this is done.

However just because you set the DNS up to go " resolves to", which is their IP address, doesn't mean that you're giving up control of your domain name.