Get Your Site Submitted for Free in the World's Largest B2B Directory!

Email Address:
* URL:
*
*Indicates Mandatory Field

Terms & Conditions

TheDevWeb
FlashNewz
DevWebPro





Three Lines Of Code To Boost Your Search Engine Traffic

By Yuri Filimonov
Expert Author
Article Date: 2007-08-28

In the world of Web building, an opportunity to develop/code something quickly is a rare occasion. Mostly, you need to spend hours on research, planning and implementation (unless you code with CSS ;) ).

Here's yet another thing you can do in a couple of minutes to help search engines index your site better, so you could get more traffic within a week or two by 5-15%.

Canonicaluzation Issues

- "What?"

- "Ca-no-ni-ca-lization/canon-ica-lization/canonic-a-liz-ation issues."

It is when your website can be accessed with www and without www in front of it (such as improvetheweb.com and www.improvetheweb.com) and you, the visitors and the search engines are not redirected to only one version.

To the visitors, this doesn't matter a lot, unless they prefer to identify website addresses with 'www' or without (there are pros and cons of either approach).

The issue is that for the search engines, both versions are two different versions of the website, because the search engines index URLs, not websites as a whole.

Why is it a problem?

As the search engines see two websites, the number of pages with the same content doubles. As your visitors link to either of the versions randomly, both of them will have average amount of links.

Of course, the search engines will show one of the versions, but they will only count links that point to one of the versions, to which a specific page belongs to.

For example, if the page is http://improvetheweb.com/overdeliver, the search engines will count links that point to this page - most likely from the http://improvetheweb.com domain and sites that linked to that URL.

For the search engines to take into account all the links that point to your website (such as http://www.improvetheweb.com and http://improvetheweb.com), you need to redirect visitors and the search engines from one version to another.

Thus, the search engines won't be taking into account all your naturally acquired links and won't be showing your pages high in the SERPs as they rightfully deserve.

Why redirect?

By redirect the search engines to only one version of the site, we confirm their suspicion that we only have only one version of the website (not two different sites with similar content).

This way, they treat links to both www and non-www versions as links to one website and thus, which ever version you redirect to, gets a boost of incoming link value from the redirected version.

That's why you'll get more visitors from the search engines, which will lead to more customers, links and profit within a week or two (Google, others may be slower) by 10-15% (the speed relates to how fast the search engines react to the redirect and whether the version you redirect to is fully indexed).

If the version you are redirecting to is not indexed for one reason or another (except outright ban), you'll need to wait while Google and other SEs index the site and start taking all links into account.

This may take a week more or longer, depending on how large your site is. In this case, and if the version you are redirecting from is stronger (has more links), you may notice a slight drop of traffic, which will later return to normal and start increasing.

Even though the search engines tell us only to do what is right for the visitors and want us to ask ourselves "would I do it if the search engines didn't exist?", this particular improvement is designed to specifically help the search engines understand how our website works, also bringing more search engine visitors to the website.

So what to do?

Naturally, you need to only have one version by redirecting one of the site versions to another.

If you want a shorter domain and your customers will be able to memorize and identify your address with the web, then you can go without www.

However, if you want to make it clear that the address belongs to the Web, use the www version.

Opinions split on which one to use, really.

To redirect from one version to another, you either need to edit your httpd.conf file, if you use a dedicated server, or update your .htaccess file in the root of the domain.

Edit httpd.conf of Apache configuration

Ron Carnell suggests using two blocks in the httpd.conf file:

‹VirtualHost 192.xxx.xxx.xxx>
ServerName domain.com
DocumentRoot /home/domain/www
‹/VirtualHost>

‹VirtualHost 192.xxx.xxx.xxx>
ServerName www.domain.com
Redirect 301 / http://domain.com/
‹/VirtualHost>=>


Basically, you only need to insert the correctly tweaked code in the corresponding part of your httpd.conf file (make sure you back it up first).

Please note that if you go this route, you'll need to tweak both parts, if one of the details changes.

If you are not familiar with the terminology and the whole process of fiddling with the Apache server, you'd rather designate this to your web admin.

If you read what Ron Carnell has said about this issue (you really should), you'll gain more insight why and how this is done.

Edit .htaccess in the domain root

But if you don't control the server, you can use the three lines of code:

How to redirect to www from non-www version:

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


(replace yourdomain.com with your domain)

How to redirect from non-www version to www version:

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


(replace yourdomain.com with your domain)

Note: using .htaccess adds overhead to the server, since it'll be processed on every request to the server. However, large websites are bound to use dedicated servers, so it is pretty smooth here.

The .htaccess file is a file named .htaccess in the root of your domain. It has various directives used to tweak server performance. You can edit it, insert the corresponding three lines of code at the top of it (change yourdomain.com to your domain) and upload it back to the server.

To test this, you'll need to refresh the page in the browser. If everything loads fine and you can go from one version to another by entering the redirected URL, it works.

If you get a 503 error, you need to make sure you have inserted the code correctly. If you can't do this after repeated attempts, remove your edition to let the server work again and contact a professional.

You can also read a mod_rewrite manual from Apache about redirecting with .htaccess.

Conclusion

Frankly, it amazes how many sites I see often that don't redirect to only one of the versions, thus leaving plenty of money on the table. The thing is, the amount of money doesn't matter, because it takes a couple of minutes of work to implement the changes by the web developer.

And the funniest thing is that depending on the site total traffic, the profit increase can be very noticeable, comparable to general marketing activities, such as increase of conversions, promotions, etc.

Comments

About the Author:
Yuri Filimonov is a freelance website optimization and usability consultant, who writes about improving websites to gain more visitors, customers and profit at his blog, http://www.ImproveTheWeb.com.




Newsletter Archive | Article Archive | Submit Article | Advertising Information | About Us | Contact

TheDevWeb is an iEntry, Inc. ® publication - 1998-2008 All Rights Reserved Privacy Policy and Legal