Web Hosting Talk







View Full Version : Setting up subdomains to point to a folder through DNS?


Janet
07-18-2002, 08:07 PM
Is it possible to point user1.domain.com to www.domain.com/~user1/ through a DNS record?

Kind of like how some hosts do multiple-domain hosting by pointing seconddomain.com to firstdomain.com/seconddomain/

Can someone tell me how to do this?

dandanfirema
07-18-2002, 08:09 PM
This is not done through DNS, this is done through the web server configuration. In most cases this is done via the httpd.conf file if you are using apache.

Janet
07-18-2002, 08:14 PM
aww, shucks. Would this work though? (for someone who has access to DNS records but not web server config)
user1.domain.com IN CNAME www.domain.com/~user1/

Thanks for the quick reply.

WII-Aaron
07-18-2002, 08:16 PM
No, it wouldn't work... sorry.

dandanfirema
07-18-2002, 08:17 PM
No. Because you are trying to tell DNS to resolve user1.domain.com to domain.com/~user1/ but domain.com/~user1/ does not resolve to an IP address...only domain.com does.

Even so, it would only provide the ip address of domain.com. It is the apache configuration that make domain.com go to directory a and user1.domain.com go to directory b.

Janet
07-18-2002, 08:27 PM
Thanks for the replies! :) Now I know it how it works. :)