This Is Locomotion - Design, Code, and News

Removing the www. in your domain

What happens to your website when you type in www.yourwebsite.com? Does it automatically redirect to http://yourwebsite.com or does it keep the www? If it keeps this prefix you are essentially telling Google and other search engines that you are running two websites. Google treats www.yourdomain.com as a seperate website from yourwebsite.com (More information on this issue known as canonicalization).

What should happen is this:
http://www.simplestation.com/

Which automatically reroutes all requests to:
http://simplestation.com/

We’ve had some debate at our office over whether it is better to redirect all http:// traffic to¬† http://www. or take it out and we’ve decided to go without the www. because if you start using sub domains it starts confusing people when you switch from www.simplestation.com to www.subdomain.simplestation.com.

Additionally www. by the definition of the acronym (world wide web) is redundant since obviously you’re browsing the web when you visit a domain with this prefix. Lastly it just adds unnecessary lines to marketing text. Since yourdomain.com is shorter and simpler than www.yourdomain.com why would you still want to add this unnecessary complexity? More information on this is below.

Why is .www deprecated (obsolete)?

Aug 14, 2003 Source: http://no-www.org/

In order to answer this question, we must first recall the definition of WWW: World Wide Web: n. Abbr. WWW 1) The complete set of documents residing on all Internet servers that use the HTTP protocol, accessible to users via a simple point-and-click system. 2) n : a collection of internet sites that offer text and graphics and sound and animation resources through the hypertext transfer protocol. 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. Using the links at the top of the page, you may view recently validated domains as well as submit domains for real-time validation.

WWW is depreciated

Another good article here: Source: http://sam.brown.tc/entry/160/how-to-remove-www-from-your-domain-name

The Solution

Add this to a .htaccess file in your public_html (or Apache document root) directory without the # symbols. If you don’t know how to do this. Contact us and we’ll gladly set it up for you.

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

Additionally get your webmaster to setup a Google Webmaster Tools account for you and set the preffered domain for your URL so that Google knows how to you prefer to display search results that link to your pages.

One Response to “Removing the www. in your domain”

  1. Here’s a generalized solution, which doesn’t require hardcoding the domain name:

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

    This is really handy if, for example, you want to create a standard .htaccess file for all your sites.

Trackbacks/Pingbacks