301 Redirects and Redirect Non-WWW Traffic to WWW

comment 1 Comment Written by Anders on August 17, 2008 – 9:00 pm

You may be amazed to learn that some search engines see the example.com and www.example.com variations of your domain name as two totally separate Web sites. This is called a www/non-www canonical issue because there is confusion as to which version is standard. This technical weakness can lead to less-than-optimal rankings one version of your domain name may rank alongside another version of your domain name even though they share the same content.

301 Redirects and Redirect Non-WWW Traffic to WWW

The search engines may believe you are proliferating duplicate content and penalize your Web site’s rankings. It is important to set up your server to redirect all traffic to one variation to prevent any confusion by the search engines.

You have probably noticed that you can visit most Web sites by visiting either example.com or www.example.com.

Redirect Non-WWW Traffic to WWW

Although the true location of a site is example.com, the most common naming convention normally includes the www. Unfortunately, despite progress over time, many of the search engines, even large engines like Google, continue to index and rank both URL variations. This can lead to various problems, including duplicate content penalties and dilution of incoming link benefits. If some Webmasters link to www.example.com and others link to example.com, the ranking influence of those links becomes spread out over two separate entities as the search-engine spiders follow the links to what they assume to be separate destinations.

This problem is often referred to as a non-www/www canonical issue. You can redirect all this traffic to one variation or the other to maintain optimal search-engine rankings and quality user experience. Fortunately, you can easily address this problem by adding a small amount of code to your Web root directory’s .htaccess file to set up a 301 redirect from example.com to www.example.com or vice versa.

A 301 redirect is also known as a permanent redirect. It tells Web browsers and search-engine spiders that a page has permanently moved from one location to another. This location may be a page on the same server or an entirely different domain name. The browser or search-engine spiders are then immediately redirected to the proper location instantly. 301 redirects are the preferred method of redirection because Google attempts to pass all the ranking influences to the new destination. By focusing all your links and traffic on one variation of your domain, you may experience an overall ranking increase.

Despite making progress in the effort to combine the results for both www.example.com and example.com, the major search engines, including Google, still struggle to completely blend the two entities. You should always set up the 301 redirect discussed in this task, and you may be curious to see if you have a large canonical issue with your www/non-www domain entries. To check, visit www.google.com and type site:newdomain.com into the search bar.

Replace newdomain.com with your domain name. This should show every single page Google has indexed of your Web site. If you find both www.yourdomain.com and yourdomain.com in the list, you have an issue. Also, take note of the total number of pages indexed in the upper-right corner of the search results. Next, type site:www.newdomain.com into the search bar. If the results differ dramatically from the results of the previous query, you probably have a canonical issue. Note that if you purposely employ the use of other subdomains besides www., the results cannot be compared accurately.

Redirect with 301 Redirects

If you move pages around or even decide to move your entire Web site from one domain to another, you need a method of alerting the search engines to this move. If not, you lose all your previous rankings, and the time and effort put into achieving them becomes a waste. 301 redirects provide you with the means to tell the search engines that not only have you moved your site, but you want all your rankings to move with it. This is a very important and often overlooked issue.
There will surely come a time when you feel a total redesign of your Web site is necessary. Unfortunately, search engines are not necessarily friendly when you make Web site changes. Suppose you move a page from www.example.com/mistydogpic1.html to a more organized, well-structured URL such as www.example.com/pictures/dogs/misty.html. If the search engines have already spidered and indexed your original URL and your Web site visitors have added the page to their browser bookmarks, you want to be sure that both your visitors and the search engines know the page has moved.

You can set up a 301 redirect to accomplish this task, and both search-engine spiders and Web browsers automatically redirect to the new location. For search-engine optimization purposes, this also preserves most if not all of your search-engine ranking factors. If you want to move your entire Web site from one domain to another, a 301 redirect is your best bet to keep your current search-engine rankings.

Once the search engine updates its Web page index, it should recognize the status change and update your listings accordingly. Keep in mind that this update does not happen instantly. Search engines make major ranking adjustments as often as once a month or as infrequently as every few months. Do not be alarmed if your redirect is not reflected immediately. Also, keep in mind that any changes you make to your Web site can negatively or positively influence your search-engine rankings. Although a 301 redirect is the proper way to make the changes mentioned in this task, your rankings may immediately return to their previous levels.

It is important to use 301 redirects any time you move a page from one location to another on your Web site. Do not expect the search engines to understand your intentions. You may consider moving a page to be a logical and intelligent decision, but the search engines initially see nothing but a missing page. When you remove pages that are no longer necessary for your site, consider adding a 301 redirect for those pages back to your site’s home page.

Otherwise, if you remove the pages and the search-engine spiders continue to crawl the missing pages, they may penalize your entire site despite the deletions being intentional. If you own the .com, .net, .org, or other extension of your domain name, you can use 301 redirects to automatically force all .net and .org visitors to redirect to the .com extension or whatever extension you choose. If your brand recognition is strong, you may own various misspellings of your domain name. 301 redirects can be used to automatically redirect any misspelled traffic to your actual domain name.

Bookmark or Share:
  • E-mail this story to a friend!
  • Technorati
  • StumbleUpon
  • Facebook
  • Google
  • del.icio.us
  • Digg
  • Slashdot
If you enjoyed the article, why not subscribe?

Browse Timeline

  • No Related Post

One Response to “301 Redirects and Redirect Non-WWW Traffic to WWW”

  1. Great post. I am interested in this problem, because I had some problems. Still have :). In few cases, personal blogs and sites, I made a 301 redirect of non-www to www in .htaccess. Guess what? Everything was going well on URL; but on Google, in search engine results, page could not be opened - they used to say that it is a redirection problem. In all cases I removed the redirection and everything went well.
    Any advice?

    By Gabi on Aug 20, 2008 | Reply

Post a Comment

About The Author: Anders

Anders is a freelance graphic designer. He specializes in CSS/XHTML web design and design of print materials including business cards, brochures and flyer’s. You can view his portfolio at andershaig.com.

Want to subscribe?

SEO blog and web design related issues. Subscribe in a reader Or, subscribe via email:
Enter your email address: