www and non-www recommendations

About the www subdomains, and recommendations.

The www part of the URL is considered deprecated. As it only makes it take longer for users to type in the URL for any given website.

WWW is an optional server configuration, rather then a required part of the URL. In short, WWW stands for World Wide Web, and is really just a subdomain.

It has been used to indicate the actual website, rather then the mail server, or the ftp server. It came from a time where some companies had multiple servers, one for each servise they would offer. I.e. ftp.yoursite.com, pop.yoursite.com

Recommendations

It is recommended that web developers simply redirect their users to one or the other. The preferred is to use the non-www version, because having www in the URL is irelevant, and only requires more typing, if the user was to type in the URL manually.

Not all sites are doing either, which could lead to duplicate content issiues with search engines, so be careful. Its also inconvenient to simply block the traffic, it would be better to redirect your users.

All you need to redirect incomming traffic on your www subdomain, is to modify, or create a file called .htaccess, and place it in your server root. Then include the following in the file:

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^brugbart\.com
RewriteRule (.*) http://brugbart.com/$1 [R=301,L]

Note. You should replace brugbart.com, with your own domain name.

See also:

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.