Why WWW.YourDomain.TLD is Doing it wrong

WWW is depreciated

WWW stands for World Wide Web, which is a term that is seldom used anymore. The use of www in a domain name is redundant and time consuming, browsers automatically prepend all URLs with the http:// protocol which connects to the HTTP server for serving a sites files. Why then is there a need to type www as well?

Most decent web servers will display the exact same files at http://domain.com and http://www.domain.com. This is the most common solution, however you may want to use only one or the other, I personally always prefer to use http://domain.tld, rather than http://www.domain.tld.

Redirecting from www to no-www at your domain

Using some simple .htaccess trickery it is easy to redirect anyone visiting your site with the www. to http://domain.com. Simply adding the following to the .htaccess file in your root folder:

RewriteEngine on
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} ^www.DOMAIN.com [NC]
RewriteRule ^(.*) http://DOMAIN.com/$1 [L,R=301]

It is possible to do it the other way around as well, redirecting anyone visiting your site without the www. to http://www.domain.com:

RewriteEngine on
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} !^www.DOMAIN.com [NC]
RewriteRule ^(.*) http://www.DOMAIN.com/$1 [L,R=301]

Which method to use

It really is up to yourself which you use. What you must make sure of is that visiting with or without the www still displays your site, and that visiting one doesn’t result in an error message.

In my opinion WWW is pretty much invisible these days, it is so common that everyone has become accustomed to seeing it. Thus, having your site redirect from the www to just http://domain.com I feel looks better, is shorter to communicate and works just as well! For example visiting http://www.PhilipMcGaw.com always redirects to the no-www option.

PS. This is an old and well discussed topic on the internet, these are my thoughts and opinions and are written here to help inform my visitors to the .htaccess Redirects topic on how to successfully go about removing or redirecting to or from the www in a domain name.

Leave a Reply

%d bloggers like this: