<p>I recently moved my website to a shared hosting solution at <a href="http://asmallorange.com" rel="nofollow noreferrer">asmallorange.com</a>, 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 </p>

<pre><code>server.asmallorange.com/~username
</code></pre>

<p>So I know I'm missing something here, my question is this: </p>

<p><strong>What in their nameservers/DNS entry makes it possible for <em>server.sharedhost.com/~username</em> to serve as a top level domain? (ie. <a href="http://topleveldomain.com" rel="nofollow noreferrer">http://topleveldomain.com</a>)</strong></p>

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.