How to set up virtual hosting with HCS
If you buy a domain from a domain registrar, HCS will host the domain for you so that you can use your domain as the address for any of the pages on your website. We can even set up multiple domains (each of which is called a "virtual host") on your account.
One of our members has created a tool that makes it easy for you to set up your own domain.
There are some things that you need to bear in mind before you start:
- HCS does not sell domains, and does not recommend any particular domain registrar. You still are responsible for buying a domain and paying for it yearly.
- HCS does not host a nameserver. You will need to continue to use your domain registrar's nameserver, or another nameserver if you so choose. (A nameserver is a server that, when given a host name, returns the correct IP address for a host on the Internet.)
Here is a basic outline of what you need to do:
- Buy a domain from a domain registrar.
- Change the following settings in your nameserver (assuming that your domain is EXAMPLE.COM; most domain registrars provide an account control panel where you can change these settings):
- EXAMPLE.COM should be a CNAME (Canonical Name) for www.hcs.harvard.edu.
- If you want, WWW.EXAMPLE.COM should also be a CNAME for www.hcs.harvard.edu.
- Note that the vhosts tool is flexible as to which subdomains you host with us. So if you want, you can just host "elephant.example.com" with us--there's no requirement that your top-level domain or your WWW domain be hosted with us.
- Important Note: If you also use e-mail on your domain (in the form firstname.lastname@example.org), you cannot set EXAMPLE.COM to be a CNAME for www.hcs.harvard.edu and still have it work. In that case, you need to set EXAMPLE.COM to be an A record for whatever the IP address of www.hcs.harvard.edu is. The thing you need to be careful about this is that the IP address for www.hcs.harvard.edu may change from time to time depending on our system requirements. While we don't foresee any changes in the near future, and while we will notify any account holders that use virtual hosting in advance when the IP address of our web hosting tier changes, if you do not use a CNAME you maintain responsibility for changing this IP address whenever necessary, or your website will cease to work when the IP address is switched over.
- Run vhosts at your HCS account's command line and follow the instructions to set up your virtual host. Type "g" at the menu of the vhosts tool to get documentation.