www. and non-www.
This makes my blood boil. Why can’t server or website admins assume / expect that users use website addresses with and without the preceding www.? i.e. www.bbc.co.uk vs plain old bbc.co.uk.
I’ve come across two sites this morning alone. Pentagonglasstech.com (www works) and thetraffordcentre.co.uk (www works).
All you need to do, plebians, is alter the DNS slightly to modify the A record so it’s not on the www, but on the domain.com record then set up the www record as a CNAME to point back to the domain.com A record. It works the same as ftp.domain.com, mail.domain.com, these are all CNAME records.
If the admin is worried about the SEO aspect of having both www. and non-www. addresses in the index then use a mod_rewrite .htaccess directive to filter to essentially redirect www. to non-www. or vice versa (totally depending on your preference).
#www to non-www
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
or
#non-www to www
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]