Thanks a ton. I wanted to confirm "then render pages based on the incoming HTTP "Host" header" part. A few questions for you,
1. So if DNS CNAME cname.theirsite.com is pointed to myserver.mysite.com, the Http requests will come to myserver.com.mysite.com, with Http['host'] as cname.theirsite.com.
2. Where can I read more about how DNS in general and CNAMES in particlular work?
1. Yes. cname.theirsite.com resolves to myserver.com.mysite.com which in turn resolves to an IP address. Browsers will send requests to your server at that IP along with cname.theirsite.com in "Host" header.
Users will likely ask for help, so you'll probably want to familiarize yourself with the UIs for major DNS providers, especially GoDaddy.
Another gotcha is that CNAMEs can be a little funky for root domains. So something.com will be harder (or impossible) for people to CNAME than foo.something.com depending on their provider. I've been told that CNAMEing the root domain means that all records (like MX) get automatically aliased as well, but I haven't found that to be uniformly true. My guess is that it depends on the DNS software.
1. Since every address gets resolved into IP, the HTTP requests come to your server's IP address. Your web server decides which site to serve based on HOST header.
You'll have to add an entry in your webserver's settings for each CNAME address you want to handle. Alternatively you can add a default entry to handle any address by a middleware. The middleware will have all the logic (by looking up the DB or whatever) about domain mapping.
I feel like you've answered the bulk of your question. Are you looking for something more specific?