3 ms·
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 head
by sharjeel 18y ago
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 did something similar in django i.e. allowed user subdomains on my site. You can read more about it here: http://sharjeel.2scomplement.com/2008/07/24/django-subdomains/ http://sharjeel.2scomplement.com/2008/07/24/django-subdomain...
2. There is a good paper on DNS. Infact only one good paper has been written on DNS which is comprehensive and covers all aspects: http://www.cs.toronto.edu/syslab/courses/csc2231/05au/papers/dns.pdf http://www.cs.toronto.edu/syslab/courses/csc2231/05au/papers...