hosted on godaddy
Next: How Do I Host My Own Website With Xampp With My Own Registered Domain Name?
Previous: How Can I Have My Own Domain Registration Service? What Are The Things Needed?
"Is It Possible To Add A Www. In Front Of A Sub Domain On A Virtual Dedicated Server?" was posted on Sunday, October 25th, 2009 at 3:31 pm.
One Response to “Is It Possible To Add A Www. In Front Of A Sub Domain On A Virtual Dedicated Server?”
Leave a Reply
Yes, it is possible.
In Apache for example, you’ll need two directives called ServerAlias and DocumentRoot within the VirtualHost section. For example, you can have the subdomain http://www.favorites.orphanmissions.com point to a folder independent from the one where orphanmission.com points to.
Or you could have http://www.favorites.orphanmissions.com and http://www.forum.orphanmissions.com pointing to different root folders. You just have to create a VirtualHost section for each of the subdomains.
Here’s a minimal configuration example in Apache:
ServerName forum.orphanmissions.com
ServerAlias http://www.forum.orphanmissions.com
DocumentRoot /home/example/public_html
ServerAdmin webmaster@orphanmissions.com
ServerName favorites.orphanmissions.com
ServerAlias http://www.favorites.orphanmissions.com
DocumentRoot /home/example/public_html
ServerAdmin webmaster@orphanmissions.com
Just be sure to create DNS records for both the ServerName (ex: favorites.orphanmissions.com with IP 1.1.1.1) and ServerAlias (ex: http://www.favorites.orphanmissions.com 1.1.1.1).
Best