May

4


Some web developers prefer to remove the “www” from their website domain URL. Although I am personally skeptical about this practice. There are supporter for this practice, the general reasons for removing “www”, to quote from www. is deprecated, the inspiration for this article:

“By default, all popular Web browsers assume the HTTP protocol. In doing so, the software prepends the “http://” onto the requested URL and automatically connect to the HTTP server on port 80. Why then do many servers require their websites to communicate through the www subdomain? Mail servers do not require you to send emails to recipient@mail.domain.com. Likewise, web servers should allow access to their pages though the main domain unless a particular subdomain is required. Succinctly, use of the www subdomain is redundant and time consuming to communicate. The internet, media, and society are all better off without it.”

To automatically remove the www from the beginning of your domain, add the following mod_rewrite rule to your .htaccess file. If you don’t have that file, create it in a text editor and upload it to your root directory. The code assumes your domain is called example.com, so you will need to change it to match your domain:

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

Many web evangelist companies like Google and Yahoo still keep the www. To adopt this practice or not is totally up to you. If you have any better idea to use or not to use this, feel free to let me know!



Similar Posts

Comments

Name (required)

Email (required)

Website

Speak your mind

1 Comment so far

  1. gracie114 on June 3, 2008 9:29 am

    very nice article, sounds very detailed.

Sponsors




Links