webservers
How do I point "www.domain.com" at "domain.com" or vice-versa?
Posted June 12th, 2007 by markjr in
You may have your webserver setup for either www.example.com or just example.com and you want it to work either way, whether people type in the "www" part of your domain or not.
(By way of info, "www" is purely a convention, it isn't in itself necessary to "make your domain work" over the web).
There are a couple ways to do this:
Setup a host record or A record for the root example.com domain. Then create a CNAME record or alias which points www.example.com at this host record.
In a bind style zone file you would put this: