As per other responses, arrange for a 301 redirect from the unadorned domain name to the site with the www.
prefix.
Given that I actually work in the DNS industry, I'd like to share my views on the www.
debate:
For now, at least, IMHO, the preferred version of URLs should be with the www.
prefix. The hostname part of a URL is exactly that, it is a hostname. The only DNS resource records that your browser will search for are A
(and possibly AAAA
for IPv6) records, and the resulting IP address is that which it'll connect to.
It is not a web site address - only the full URL (with the http://
prefix) specifies that this host is expecting to receive HTTP connections on port 80.
The whole reason for the www.
prefix in the first place was to allow for the separation of different protocols to different hosts. As Verisign showed when they (briefly) introduced their "SiteFinder" service several years ago, assuming that every request for an A record is for the use of the HTTP protocol is a massive mistake.
Having the canonical version of your URL be the one with the www.
prefix also makes cookie handling easier, and allows for easier splitting of static content to content delivery networks (as recommended by Yahoo!, Google, etc).
Now, there is a DNS record type (SRV
, see RFC 2782) which uses a service and transport prefix to allow a single domain name to dispatch different protocols to different hosts (and hence IP addresses).
The ideal DNS set up would be a record that looks like:
_http._tcp.example.com IN SRV 10 0 80 www.example.com.
This says that all requests for HTTP URIs over TCP/IP should be addressed to TCP port 80 on the hostname www.example.com
. Note that with this syntax you could also have HTTP services automatically server from ports other than port 80 without the port number being part of the URL.
The SRV
record is a required part of SIP, and is commonly used for Jabber (XMPP). However AFAIK no browser uses it. :(