The www Problem

When visitors type in your site’s URL, they have many different options. Do they add the ? Do they add the www? Do they leave it out? Do they mistype the URL somehow? There’s a lot of variety when it comes to a visitor trying to get to your site and it improves usability when you eliminate as much as possible. Shouldn’t the www be meaningless by now?

How Your Site Could Handle Different Requests

  1. Both www and non-www URLs work.
  2. If your visitor enters www.example.com, they will be redirected to example.com
  3. If the visitor enters example.com, they will be redirected to www.example.com
  4. Or it could be broken!

www and Non-www Work

An example of a site that does this would be TechCrunch. Both the www version and the non-www version work without any redirects.

This is a usable practice. Visitors don’t have to worry about being redirected or typing in the wrong address prefix. However, some search engines see the www as a subdomain. If a blog links to www.techcrunch.com and another one links to techcrunch.com, they are counted as links to two separate sites, which leads to a lower search engine rank. This can severely hurt TechCrunch’s SEO score, although that probably isn’t an issue for them as the #2 most popular Technorati blog.

Redirect to non-www

Digg.com redirects its www-inclined visitors to the non-www equivalent. The readability of the URL is improved because the visitor isn’t distracted by the unnecessary www.

Bonus points: if you have information in the URL (say you’re trying to view the top stories over the last 24 hours), using the www prefix doesn’t delete that information and leave you confused and at their homepage. Check out what happens when you go to their top stories with www. You’ll never even notice the difference.

Redirect to www

Amazon.com is the most popular online retailer and they use this method. When you go to amazon.com, you are quickly redirected to www.amazon.com. This doesn’t make a difference from a usability standpoint once you consider their audience. Amazon attracts more people that aren’t as technologically-inclined as Digg users. Seeing the www missing from the URL might confuse them to the point of thinking something is broken with Amazon and abandon whatever shopping they were doing. This is the worst case scenario, but none the less, a valid consideration. Amazon made the right choice when it came to which www method to use.

Bonus points for Amazon: if you get a bit too trigger happy with your w’s, Amazon is right there to save you. If you type in wwww.amazon.com, you are still redirected successfully to Amazon’s homepage. This reinforces trust in the Amazon brand because they will always have your back. From a business perspective, this is an excellent idea because Amazon wants to get you looking at products faster by avoiding a potentially confusing error from a simple typo.

URL Was Broked

If your site only works with www.yoursite.com, you are going to run into trouble when a power user comes along, someone who knows that the www is now a pointless exercise. A visitor comes along, doesn’t type the www, and then is presented with a “Server Not Found” error or a 404 page. They will think something is wrong and most likely leave.

Please do not let this happen to your visitors. Accept any variation of URL your visitor can throw at you.

How To Do It Right

The ideal solution for the www problem is to redirect all requests to a non-www address as soon as the visitor gets to the site. During the redirection, the visitor should not lose any valuable URL information either. It should preserve the visitor’s original request, like the Digg example above. Redirect pages are definitely not invited to the party (”wait here for 5 second while we bore the hell out of you”). This allows for usability improvements and higher SEO scores for certain search engines.

Truthfully, it doesn’t matter much whether you use option 2 or 3. It’s a personal preference and I like keeping www out of all the fun!

The only step to redirecting your visitors is to put the following in your .htaccess file and changing example.com to your domain:

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

The first bit is turning on Apache’s ability to redirect certain URLs. The 3rd line is saying “for URLs that begin with a www” and the 4th “permanently redirect to a non-www version of the URL.” The 301 redirect (note the R=301) makes sure search engines and browsers understand that this is a permanent redirection. Copying and pasting 4 lines into your .htaccess file is an easy way to instantly improve the usability and SEO of your site.

# Usability Tip tags: htaccess, seo, www on Sep 19, 2009

14 Comments

  1. Url Redirection Service says: Sep 25, 2009

    For example, under the DocumentRoot , Prefix Substitution with //thishost[:thisport]/ (which makes the new URL a URI) to force an external redirection. Url Redirection Service

  2. Tim O'Brien says: Oct 1, 2009

    There was a post on the Google webmaster blog about the www vs. non-www SEO concerns. SO at least with Google, you can use rel=”canonical” on the page you want to link to and still have www and non-www links count toward relevancy.

    googlewebmastercentral.blogspot.com/2009/09/duplicate-content-and-multiple-site.html

  3. Luke Jones says: Jan 28, 2010

    I think your conclusion is a little mixed up and leaning towards a yourdomain.com/ URL way too much – a bit like the rest of your article.

    The usability aspect of having www or no www is so minor that it’s neither here nor there. If you asked over 100 people if they though the ‘www’ was necessary, I’m sure they would say yes straight away – because the ‘WWW’ has been slammed into their minds every time they see a url.

  4. Pavan Garre says: Feb 27, 2010

    This entire article can be posted as a tweet/a small message and that is best usable practice of writing for web.”Make sure your site work with www/without www” that’s it. The arguments produced are missing the fact, users learn and adapt over the go. Bigger usability problems designers had with fancy URLs names like del.icio.us, which now fixed by redirecting to delicious.com. I registered for delicious account because it’s creative URL. In this delicious context I personally don’t like the more usable URL over creative URL.

  5. test says: Jan 25, 2011

    sdsdsds

  6. musokna says: Apr 21, 2011

    Скидки на остекление квартир пластиковыми окнами пвх, Пластиковые окна москва.

  7. Brice Murello says: Jun 15, 2011

    I have seen that fees for online degree professionals tend to be an incredible value. For example a full Bachelors Degree in Communication with the University of Phoenix Online consists of Sixty credits from $515/credit or $30,900. Also American Intercontinental University Online gives a Bachelors of Business Administration with a total school element of 180 units and a cost of $30,560. Online studying has made obtaining your certification so much easier because you can earn your own degree through the comfort of your home and when you finish from work. Thanks for all the other tips I’ve learned through your blog.

  8. Dulcie Baglione says: Dec 14, 2011

    Sorry with the enormous review, but I’m truly loving the newest Zune, and hope this, as well because the fantastic reviews some other people today have published, will enable you to come to a decision if it’s the correct choice in your case.

  9. chanel glasses says: Dec 15, 2011

    You are necessary to do your slated diligence and always check that the copying that you pickup in order to has a small volume finest of to itchanel handbags yet a quick quest regarding do it yourself foothold

  10. Szkola jezykow obcych says: Dec 15, 2011

    Thank you, I have recently been looking for information about this topic for ages and yours is the best I’ve discovered so far. But, what about the bottom line? Are you sure about the source?

  11. dboys airsoft says: Dec 18, 2011

    The next time I read a blog, I hope that it doesnt disappoint me as much as this one.I mean, I know it was my choice to read, but I actually thought youd have something interesting to say.All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.

  12. odogeorohic says: Jan 3, 2012

    [url=www.angry-birds-rio-online.com]Angry Birds online[/url]

  13. LipSuilitut says: Jan 30, 2012

    [url=affmobile.WebStarts.com]adultfriendfinder mobile[/url] adultfriendfinder android app

  14. android market says: Jan 30, 2012

    Hello There. I found your blog using msn. This is a really well written article. I will make sure to bookmark it and return to read more of The www Problem I Love Usability . Thanks for the post. I’ll certainly comeback.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.